Skip to content

Instantly share code, notes, and snippets.

@mohdsayed
Last active August 10, 2016 18:00
Convert setting id to class
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