- $('document').ready(function() {
- $('ul.nav.top > li > a').filter(function(){
- return ($(this).next().length == 1);
- }).css('cursor','default');
- });
When the dom is ready, run this closure
$('document').ready(function() {
Select all ul elements with a class of top and nav, find all direct children that are list items, find all direct children that are anchor tags, then filter them by this closure
$('ul.nav.top > li > a').filter(function(){
return true if .next() on the current anchor tag results in a jQuery element array with a length equal to one. meaning, it has a sibling.
return ($(this).next().length == 1);
Apply css to the remaining elements.
}).css('cursor','default');
end of closure and dom ready event
});
All together, we select all anchor tags that are in the top level ul, filter them down to only anchor tags that are followed by an element, and then apply css to the anchor tags.
-- Kevin
------------------------------------------------
http://www.tentonaxe.com - New Design!