Pretty URLs not recognized by jQuery? (SOLVED)

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
appleyard
Forum Members
Forum Members
Posts: 27
Joined: Wed Dec 30, 2009 2:54 pm

Pretty URLs not recognized by jQuery? (SOLVED)

Post by appleyard »

Hi everyone, this is my first post. I've been using CMSMS on a few recent projects and have REALLY enjoyed it!

My issue is this: my site is using Pretty URLs, and on a page that's a few levels deep into the hierarchy (e.g. "domain.com/section/page/"), I'm running a jQuery script (Code Slider: http://www.ndoherty.biz/tag/coda-slider/ ) that uses hash links to trigger a sliding effect. Unfortunately the links are resolving to "domain.com/#2" (thus sending the browser to the homepage) instead of "domain.com/section/page/#2", which I guess is because the page is running from domain.com/index.php. When I type in the rewritten URL + hash anchor manually, it works as expected.

I have posted this question to the Coda-Slider forum as well, but it seems like this might be a problem for a lot of jQuery scripts that use hash anchors for triggers. Is there a way to pass the rewritten URL from CMSMS to JavaScript/jQuery?
Last edited by appleyard on Thu Dec 31, 2009 4:21 pm, edited 1 time in total.
JeremyBASS

Re: Pretty URLs not recognized by jQuery?

Post by JeremyBASS »

The issue it the you’re not using a page extension.. I code heave in jQuery... never have this issue but I always use page extension .html... But that it My2Cents... Hope this helps...
Cheers
Jeremy
appleyard
Forum Members
Forum Members
Posts: 27
Joined: Wed Dec 30, 2009 2:54 pm

Re: Pretty URLs not recognized by jQuery?

Post by appleyard »

Ah, that makes sense. Thank you sir!
JeremyBASS

Re: Pretty URLs not recognized by jQuery?

Post by JeremyBASS »

Always happy to help, don't forget to mark solved in your original post title if it's fixed... Cheers and happy New Year.
Jeremy
Post Reply

Return to “CMSMS Core”