Question

I need to EXCLUDE a link from the selected class in this script. Can anyone show me how to exclude a link with a .logo class? Checkout the links and the logo for the home link: link text

$(document).ready(function() {


$('a.panel').click(function () {

    $('a.panel').removeClass('selected');
    $(this).addClass('selected');

    current = $(this);

    $('#wrapperQ').scrollTo($(this).attr('href'), 800);     

    return false;
});

$(window).resize(function () {
    resizePanel();
});

});
Was it helpful?

Solution

try to use not function.

$('a.panel').not('.logo').click(function () {
  ...
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top