html - Radio button jQuery change doesn't work -
sorry if repost, i've looked around , cannot find solution works.
i have radio buttons, , want execute function when changed. other posts thought should work
$(function() { $("#ismale").change( function() { alert("test"); location.href = 'http://google.com' } }); but doesn't, can ?
the selector wrong, need close .change function brackets too:
$(function() { $("input[name=ismale]").change( function() { alert("test"); location.href = 'http://google.com'; }); });
Comments
Post a Comment