Stumped by jquery.find() method for parsing JSON from Wiktionary API -
i'm using this code starting point parse json returned via wiktionary api. want customize code extract ipa pronunciation info word. i'd hoped write myself getting started messing around code linked above. understand of it, hit wall this:
$("#wikiinfo").find('a:not(.references a):not(.extiw):not([href^="#"])').attr('href', function() { return baseurl + $(this).attr("href"); } ); i understand .find() method, chain of :not() selectors , appears compound selector a:not(.references a) filtering links class 'references' inside links? huh?
do successive :not() selectors apply additional filter? i'm totally lost. can please explain what's going on in above pasted code?
the selector says find andchors 'a' aren't inside , element class '.references' , has not class extiw , attribute href starts # :
'a:not(.references a):not(.extiw):not([href^="#"])' a: select anchors.
:not(.references a) : except ones inside elements class
references.:not(.extiw) : , hasn't class
extiw.:not([href^="#"]) : without attribute
hrefstart#.
hope helps.
Comments
Post a Comment