JQuery button not created with icon and label -
i creating 2 buttons use in dialog box , not seem do, cannot icon display text. can elsewhere fine.
this works (which copy , pasted docs:
$("#signout_button").button({label:"sign out", icons: { primary: 'ui-icon-key'}});
this not work:
$("#dialog_link").dialog({draggable: true, title: "are sure?", show: "slide", modal: true, width:500,height:200, buttons: [{ label:'yes, sure', icons: { primary: 'ui-icon-alert' }, click: function(){ alert('well alrighty then'); } },{ text:'no, please make stop', icons: { primary: 'ui-icon-alert' }, click: function(){ alert('well alrighty then'); } }] });
the div exists , simple
<div id="dialog_link"></div>
it's sort of weird syntax error think. dialog box pops open fine , click events fire javascript did not crash.
the first button, way familiar results in button no icon , no text. 2nd button icon text.
i have tried:
text:true, label: 'test label', icons: {primary: 'ui-icon-alert'}, click: function(){ alert('testing');}
the signout button @ renders both icon , label. jquery bug in dialog box creation or missing stupid , simple?
it seems not built-in dialog create buttons icons.
your problem empty button simple: don't write "label" use "text" instead (as on second button).
to use icon anyway see solution jquery ui dialog button icons. think last answer best.
i put in fiddle , works: http://jsfiddle.net/gzemt/
Comments
Post a Comment