mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Support for button switches
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8842 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8c8f3dc298
commit
0722dd0643
1 changed files with 21 additions and 0 deletions
|
|
@ -54,6 +54,27 @@ jQuery(function($){
|
||||||
.trigger('update.checkbox', [name, this.checked]);
|
.trigger('update.checkbox', [name, this.checked]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Button switch
|
||||||
|
$('button[name]')
|
||||||
|
.click(function(){
|
||||||
|
var $this = $(this), $radio;
|
||||||
|
|
||||||
|
$radio = $this.data('radio');
|
||||||
|
if(!$radio) {
|
||||||
|
$radio = $('<input type="radio" />').hide()
|
||||||
|
.attr('name', $this.attr('name'))
|
||||||
|
.attr('value', $this.attr('value'))
|
||||||
|
.insertBefore($this);
|
||||||
|
|
||||||
|
$this
|
||||||
|
.removeAttr('name')
|
||||||
|
.removeAttr('value')
|
||||||
|
.data('radio', $radio);
|
||||||
|
}
|
||||||
|
|
||||||
|
$radio.prop('checked', true);
|
||||||
|
});
|
||||||
|
|
||||||
// Global Navigation Bar
|
// Global Navigation Bar
|
||||||
var $menuitems = $('div.gnb')
|
var $menuitems = $('div.gnb')
|
||||||
.removeClass('jx')
|
.removeClass('jx')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue