Hi guys and galls,

Im not really a jquery programmer but i build lots of sites and i love
the jquery plugins that i can easily copy and paste. So anyway im
building a new site and i am using alot of jquery to emprove
usability.

So i am using a little script that scrolls easy to the <a name="p1"></
a> html tag.

[code]

$(document).ready(function(){
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^
\//,'')
    && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target
      || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body')
        .animate({scrollTop: targetOffset}, 1000);
       return false;
      }
    }
  });
});

[/code]

This is not my own code, i found it. As i said im not a jquery pro.

Anyway i was wondering if it is possible to somehow highlight the div
class with a background color to make it stand out more? Something
that i can add to this little piece of code?

If there are things that i should include please let me know.

Thank you very much in advance.

Kind regards,

Michael

Reply via email to