Jump to content
Stef's Coding Community
Sign in to follow this  
Archadian28

jQuery Question

Recommended Posts

I have a dropdown submenu in the nav bar of my website...when i click on one of them it works fine. When im on the same page as where those links point to they dont seem to work correctly. ex: if i am anywhere else on the website except the portfolio page the links work fine, but when im running the portfolio.php script and i try to click any of the links it just takes me back to the home part of the portfolio page. I will have to post my web address because even im confused about what i just said lol. its imaginationunleash3d .com/new/

 

jQuery was used to make the slide down divs for the submenu

 

just trying to figure out a way to make all links work whether they are for that particular page or not. Its giving me a headache XD.

 

I forgot to mention that im using jQuery .tab() plugin. When i click the link i want it to open that particular tab, which it does, unless im on the page already.

Edited by Archadian

Share this post


Link to post
Share on other sites

Is your portfolio page in a different folder? If so, might set your links to use absolute paths instead of relative.

Share this post


Link to post
Share on other sites

get rid of that 'New site design...' script you have running. It's very very annoying. Thereafter we can take a look at what's going on.

Share this post


Link to post
Share on other sites

Can anyone help with this? I mainly want everything after the ? taken out of the URL once the page is visited. I think the link would work then. Its nothing serious but i want everything to work. Thanks.

Share this post


Link to post
Share on other sites

I've played around with this a little, and my best guess is that maybe it's an issue with the tab script itself. This issue doesn't seem to occur when Javascript is turned off, though I'm not sure how much that actually means. I'm assuming you don't have anything PHP related on the page that messes with the URL?

Share this post


Link to post
Share on other sites

I'm not sure if I can help you any more with this. I'm not seeing any reason this should occur. If this were me, either I would figure out some alternatives that didn't use the tab functionality, or switch to a different tab script and see if that makes any difference.

Share this post


Link to post
Share on other sites

I'm not completely sure what you have in mind, but you could pass in a variable in the URL using $_GET[] and then echo out that variable within a <script> block in the page. Definitely escape any variables passed in through the URL though.

Share this post


Link to post
Share on other sites

I just disabled the submenu when ur on the page. ex: If you are on the portfolio page the submenu will be hidden for the Portfolio navigation with this:

 

$("ul.portfolio li").hide();

 

That works for me, i just didn't want it to seem like i had broken links :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...