here is my jQuery and php code but jQuery code do running never. where is problem. i learned about jquery recently.
after running this code we should have two value for drop down list (very nice and nice) and after checking check box, values should change to 'not bad' and 'bad'
<script>
var $checkbox = $("#checkbox");
var $selectMenu = $("#selectMenu");
var checkedContent = "<option>not bad</option><option>bad</option>";
var uncheckedContent = $selectMenu.html();
$checkbox.on("click", function(){
var $this = $(this);
if($this.is(":checked:not")){
$selectMenu.html(checkedContent);
} else {
$selectMenu.html(uncheckedContent);
}
});
</script>
<input type="checkbox" name="checkbox" id="checkbox">
<select name="test" id="selectMenu">
<option>very good</option>
<option>nice</option>
</select>