Last active
August 10, 2016 18:00
-
-
Save mohdsayed/cf28338a9ceca11a913d6b3ad20d3db5 to your computer and use it in GitHub Desktop.
Convert setting id to class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var settingId = '[post][id]' | |
var className = settingId.replace( /]/g, '' ).split( '[' ).filter(Boolean).join( '-' ); | |
// Makes it post-id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment