September 21, 201213 yr Hi, I am in the middle of constructing this page: http://inspiredworx-labs.com/sites/splash/services/ As you can see there are 5x links labelled All, Advertising, Digital, Design & Consulting. When clicking on one of the links (Advertising for example), the content rearranges but because of the anchor links (#advertising - for example), the top of the site is now out of view. The page gets scrolled down to the anchor links. Is there anyway I can overcome this? I hope I've made sense there!! Thanks in advance
September 21, 201213 yr isn't that what an anchor is meant to do? What if your header was fixed somehow? Different layer or some such and the linky stuff was margin'd down the page?
September 21, 201213 yr Author isn't that what an anchor is meant to do? What if your header was fixed somehow? Different layer or some such and the linky stuff was margin'd down the page? I am only using the links to switch the content when clicked, I didn't want the page to 'jump' down to the link itself. Is there another way around this?? Thanks
September 22, 201213 yr Author Use event.preventDefault() Thanks! It doesn't seem to work on page load though, the page directs straight to the #all anchor tag... any ideas how to prevent this? Thanks
September 22, 201213 yr Author Pass it the option: useHash : false It renders my jQuery filter useless then though...
September 23, 201213 yr It renders my jQuery filter useless then though... Problem is the options aren't very well documented, but I'd assume it provides an alternative method of making it work, without the hash identifiers - they wouldn't provide an option that completely breaks the script.
Create an account or sign in to comment