jQuery: If this HREF contains

Viewed 125643

Why can't I get this to work??

$("a").each(function() {
    if ($(this[href$="?"]).length()) {
        alert("Contains questionmark");
    }
});

Ps.: This is just at simplifyed example, to make it easier for you to get an overview.

6 Answers
Related