I want to draw a box around my unsorted lists, and also around the included links. To do that, I can write this JavaScript oneliner:
$('ul').find('a').andSelf().css('border', '1px solid blue');I select all the ULs in my document, than I find all the included A elements, and I join the two sets by calling andSelf(). Finally I call css() specifying that I want to put a thin blue line border around them.
No comments:
Post a Comment