i not able understand statement. tired on google showing example
$('#mydiv a:first').attr({ href : 'newdestination.html', rel : 'super-special' });
its sets attribute dom element using attr method of jquery.
in example, setting href , rel attribute element matching selector '#mydiv a:first'.
'#mydiv a:first'
it means if there div id mydiv, take first child element anchor (a) , apply these attributes it.
Comments
Post a Comment