Load links as unselected in jQuery
- by shummel7845
I have sets of links with id and name attributes, id for individual identifiers and names for groupings. In my jQuery, I have a click function that manipulates the CSS based on what a user clicks on.
But I want to start the freshly loaded page with some of the links disabled (no href attribute) and with a style applied. I tried this, but it didn't work.
$(function() // Alias for $(document).ready()
{
var $links = $('li a');
$links.(function(){
$('a[name="beam"]').filter(function() {
$(this).addClass('unavailable');
$(this).removeAttr('href');
});
}); ......
Ideas? (Beam is one of the groupings by name).