2

I've got a bunch of jquery/javascript running on a new site I'm building, and of course I've run into a conflict. I can't figure out where it's coming from as I'm not that great with js. There is a sticky relocate function that's supposed to show a navigation bar when you start scrolling the page but since I've added in a category filter function, the navigation bar no longer shows.

Site: audreylynn

lolo
18.1k9 gold badges28 silver badges49 bronze badges
asked Feb 21, 2012 at 18:57
1
  • 3
    jquery conflicting with javascript... thats not possible... try using some debugger like firebug for firefox or if you are using chrome use the developer tools Commented Feb 21, 2012 at 19:00

1 Answer 1

3

It looks your javascript has an error which is probably causing your problem.

Uncaught TypeError: Cannot read property 'top' of null /demo/:75

Looking at the code:

70 // Ensure target exists
71 var $target = $(this.hash), target = this.hash;
72 if (target) {
73 
74 // Find location of target
75 var targetOffset = $target.offset().top - 95;
76 $(this).click(function(event) {

It looks like your check on line 72 should be:

if ($target.length > 0) {

To ensure that the element actually exists. (Because "#tellShow-anchor" doesn't)

answered Feb 21, 2012 at 19:05
Sign up to request clarification or add additional context in comments.

3 Comments

in line 71, shouldn't that , be a ; ?
I'm an idiot :o) Thank you so much for the incredibly fast help.
No problem. Go ahead and mark the answer as accepted so the question doesn't show up as unanswered.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.