Reputation: 1820
I am trying to use a jquery plugin that requires the href to be href="#". however when I click on these links to which have onclick actions, then instead of the action taking place (I can see it take place briefly actually) the index page loads with the url: www.mysite.com/#
I have narrowed the problem down to my base href script that is required for my shopping cart:
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
This base href script is needed to switch between SSL and none SSL pages. DIR_WS_CATALOG is defined as /
which is my index.. So is there any way around this? Do you need more information I'm not sure what else to look at?
Upvotes: 0
Views: 205
Reputation: 10736
Usually we do event.preventDefault(); on the anchor. IE
$('a.class').click(function(e) {
$(this).toggleClass('active');
e.preventDefault();
});
Upvotes: 6