i have the following code, in my doc.load on my script.js file:
and it works great, more importantly if i have that code on a page that does not have any ".innerPage_nav li a" elements the page still loads fineCode:$('.innerPage_nav li a').each(function () { $(this).prepend("<span></span>"); });
But i am trying to include my script.js file into another site and when i do i get a JS halt error because ".innerPage_nav li a" does not exist? (says object is null)
what could be different that would cause jQuery to keep going if the element isn't there in one case, but halt in another?
Thanks,
-aPeg


Reply With Quote
Bookmarks