开发者

Click a link on a home page and have it open an accordion other then default actice

开发者 https://www.devze.com 2022-12-11 05:58 出处:网络
Hi I need to be able to click a special menu link on the homepage and have it open a page with an accordion open to a different section other then the one that is normally active (0) when you visit th

Hi I need to be able to click a special menu link on the homepage and have it open a page with an accordion open to a different section other then the one that is normally active (0) when you visit the page from the default (different) menu li开发者_StackOverflow中文版nk. I am pretty new to jQuery but I think I can follow proposed solutions.

Thanks!


What I can think of, is that you can send a var via your URL and GET it in the target page, and depending on the value of this var, you open/close whatever accordion section you want. For a javascript function to get values, you can do something like this:

function getUrlVars() {
var map = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
    map[key] = value;
});
return map;
}

Source

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号