Testcase for jQuery Ticket 7382

class!=... not working in FF in 1.4.3. Fixed on GIT

by jitter

HTML

<form action="/" class="invalid">
    <button type="submit" name="blah"> Invalid submit. Doesn't get a handler </button>
</form>
<form action="/" class="valid">
    <button type="submit" name="blah"> Valid submit. Gets a handler </button>
</form>

JavaScript

$("form").bind("submit", function(e) {
    e.preventDefault();
});

//is this intended? For every mouseover event on document
//another submit handler is attached to the mapped forms
//Here multiple alerts will be shown over time
$(document).delegate("form[class!=invalid]", "mouseover", function() {
    $(this).bind("submit", function() {
        alert($(this).text());
    })
});