I have built a jquery slider for my website. There are 3 slides in total and each slide contains 30-40 images linking through to a separate page.
I would like to completely remove the href links on the slides that are not active, and then add them in again when the slide is active. I have tried a few methods such as:
$('a').click(function(e){
e.preventDefault();
});
But this only prevents the link clicking through and doesn’t actually remove it.
Any suggestions on what i could do?
The reason i would like to do this is because Google doesn’t like more than 100 internal links on a page and i have nearly double that!
Thanks, Dan
please be aware that google will scrape the original code and won’t pay attention to the one resulting in js manipulations.
you can start without href in the dom and have something like
when the event for image sliding in fires you can activate it with:
or you could actually activate them all at once on dom ready