8000 Selectmenu: Fix examples for `classes` option by scottgonzalez · Pull Request #313 · jquery/api.jqueryui.com · GitHub
[go: up one dir, main page]

Skip to content

Selectmenu: Fix examples for classes option #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion entries/selectmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,29 @@
"ui-selectmenu-button-open": "ui-corner-top",
}</default>
<xi:include href="../includes/classes-option-desc.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../includes/classes-option-example.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<examples>
<example>
<desc>Initialize the <placeholder name="name"/> with the <code>classes</code> option specified, changing the theming for the <code>ui-selectmenu-menu</code> class:</desc>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this commen 8000 t to others. Learn more.

Don't need the <placeholder name="name"/> here, could instead inline selectmenu. That's used a few more times below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it so the diff to the include is as small as possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense.

<code>
$( ".selector" ).<placeholder name="name"/>({
classes: {
"ui-selectmenu-menu": "highlight"
}
});
</code>
</example>
<example>
<desc>Get or set a property of the <code>classes</code> option, after initialization, here reading and changing the theming for the <code>ui-selectmenu-menu</code> class:</desc>
<code>
// Getter
var themeClass = $( ".selector" ).<placeholder name="name"/>( "option", "classes.ui-selectmenu-menu" );

// Setter
$( ".selector" ).<placeholder name="name"/>( "option", "classes.ui-selectmenu-menu", "highlight" );
</code>
</example>
</examples>

</option>
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<option name="icons" type="Object" default='{ button: "ui-icon-triangle-1-s" }' example-value='{ button: "ui-icon-circle-triangle-s" }'>
Expand Down
0