fonction not() et attribut conditionnel
Bonjours à tous.
Je viens de mettre à jour jQuery sur mon site et j'ai un petit problème avec ce code
Code:
1 2 3 4 5 6 7
|
// liens externes
$('a[href^="http:"]')
.not('[href^="http://www.monsite.fr"])')
.not('[href^="http://monsite.fr"])')
.not('[href^="http://dev.monsite.fr"])')
.addClass("external").attr({ target: "_blank" }); |
Citation:
uncaught exception: Syntax error, unrecognized expression: [href^="http://www.monsite.fr"])
Je ne vois rien dans la doc :
http://docs.jquery.com/Selectors/not
http://docs.jquery.com/Selectors/attributeStartsWith
Merci pour votre aide :)