Form:has selector does not work on IE
- by Joel
Hey,
I am trying to use "form:has" selector which works on Chrome but not on IE.
http://jsbin.com/uvumu/2
Does anyone have any idea why it is not working on IE? (when pushing the Post button there should be an alert box)
Edited:
Here is the code:
JS:
$(document).ready(function() {
$(".comment-link").live('click',function() {
return false;
});
$("#morefeeds-link").click(function () {
return false;
});
// Form submittion - doesnt work
$("form:has(.commentBtn)").live('submit',function () {
alert("a");
return false;
});
return false;
});?
HTML
<form>
<a href="#" class="comment-link" style="font-size:12px;">Comment</a>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle">
<input type="hidden" name="commentkey" value="1">
<input type="text" name="commenttext" class="commentfocus" value="Express your opinion">
</td>
<td valign="middle"><input type="submit" class="commentBtn" value="Post"></td>
</tr>
</table>
</form>