Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Button: add support for input elements wrapped in labels for checkbox…
… and radio. Fixed #6063 - Button doesn't support radio input inside label.
- Loading branch information
Showing
2 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Button Visual Test : Button ticket #5261</title> | ||
<link rel="stylesheet" href="../visual.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css"> | ||
<style type="text/css"> | ||
.set { | ||
padding: 1em; | ||
} | ||
</style> | ||
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script> | ||
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script> | ||
<script type="text/javascript"> | ||
$(function() { | ||
|
||
$('#toggle').toggle(function() { | ||
$('input,button').not('.buttonset').button(); | ||
$('div.buttonset').buttonset(); | ||
},function() { | ||
$('input,button').not('.buttonset').button('destroy'); | ||
$('div.buttonset').buttonset('destroy'); | ||
}); | ||
});; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<h1 class="ui-widget-header"><a href="http://dev.jqueryui.com/ticket/6063">#6063 - Button doesn't support radio input inside label.</a></h1> | ||
|
||
<div class="set"> | ||
<input name="1" id="radio" type="radio"/> | ||
<label for="radio">Radio</label> | ||
|
||
<label><input name="1" id="radio_wrapped" type="radio"/>Radio Wrapped</label> | ||
<label><input name="1" type="radio"/>Radio Wrapped (No ID)</label> | ||
</div> | ||
<div class="set"> | ||
<input name="2" id="checkbox" type="checkbox"/> | ||
<label for="checkbox">Checkbox</label> | ||
|
||
<label><input name="3" id="checkbox_wrapped" type="checkbox"/>Checkbox Wrapped</label> | ||
<label><input name="4" type="checkbox"/>Checkbox Wrapped (No ID)</label> | ||
</div> | ||
|
||
<div class="set"> | ||
<div class="buttonset"> | ||
<label><input class="buttonset" name="5" type="radio"/>Wrapped 1</label> | ||
<label><input class="buttonset" name="5" type="radio"/>Wrapped 2</label> | ||
<label><input class="buttonset" name="5" type="radio"/>Wrapped 3</label> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<hr/> | ||
<div> | ||
<button id="toggle">Toggle Widget</button> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters