I'm having a strange error that a if statement isn't working.
$("input[name*='default']").click(function() {
if($(this).val() != "Custom"){
$(".crawlers").hide();
$(".special").hide();
} else {
$(".crawlers").show();
$(".special").show();
}
});
And my html:
<input type="radio" name="default" value="Allow" checked> <input type="radio" name="default" value="Refuse"> <input type="radio" name="default" value="Custom">
Basically, .crawlers and .special (set by id and name) aren't hiding or showing when the radio buttons are clicked. The value is definitely changing, I added and alert on $(this).val() and it showed me the alert as Custom, Allow or Refuse.
Any idea what's going on?

New Topic/Question
Reply



MultiQuote



|