r2965 commited - - remove alerts from demo
Revision: 2965
Author: malk0.phpgtk
Date: Thu Jul 23 16:08:47 2009
Log: - remove alerts from demo
http://code.google.com/p/jquery-ui/source/detail?r=2965
Modified:
/branches/labs/button/demo.html
=======================================
--- /branches/labs/button/demo.html Wed Jun 24 17:52:11 2009
+++ /branches/labs/button/demo.html Thu Jul 23 16:08:47 2009
@@ -64,7 +64,14 @@
});
$('select[class*=ui-buttonset]').selectbuttonset().filter(':gt(0)').change();
$('#switcher').themeswitcher();
- $('.ui-button-toggle:gt(18)').click(function(){alert('toggle button set
active: '+($(this).button('isActive')?'on':'off'))})
+ $('.ui-button-toggle:gt(19)').click(function(){
+ var label = $(this).find('.ui-button-label');
+ console.debug(label.html(),label.html().match(/\s+o[fn]f?$/))
+ if( label.html().match(/\s+o[fn]f?$/) )
+
label.html(label.html().replace(/\s+o[fn]f?$/,$(this).button('isActive')?'
on':' off'));
+ else
+ label.append($(this).button('isActive')?' on':' off');
+ })
$('#toggleUnable').click(function(){$('#unable').button('option','disabled',$(this).button('isActive')?true:false);});
});
</script>