Skip to content

Instantly share code, notes, and snippets.

@gabrielschulhof
Created October 1, 2014 14:34
Show Gist options
  • Save gabrielschulhof/8fb531570b9696ecec7a to your computer and use it in GitHub Desktop.
Save gabrielschulhof/8fb531570b9696ecec7a to your computer and use it in GitHub Desktop.
// As things stand:
blah.widgetname( "option", "classes", $.extend( {}, blah.widgetname( "option", "classes" ), {
"ui-widgetname-structure":
$( "<div>" )
.attr( "class", blah.widgetname( "option", "classes" )[ "ui-widgetname-structure" ] )
.removeClass( "ui-classes ui-you ui-want ui-to ui-remove" )
.addClass( "ui-other-classes ui-slated ui-for ui-addition" )
.attr( "class" )
});
// With some basic new API:
blah.widgetname( "option", "classes.ui-widgetname-structure",
$( "<div>" )
.attr( "class", blah.widgetname( "option", "classes.ui-widgetname-structure" ) )
.removeClass( "ui-classes ui-you ui-want ui-to ui-remove" )
.addClass( "ui-other-classes ui-slated ui-for ui-addition" )
.attr( "class" ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment