简体   繁体   中英

jQuery prettyPhoto: How to pass additional GET parameters?

<a href="page.html?iframe=true&amp;width=700&amp;height=100%&amp;myVar=text" rel="prettyPhoto">Click Me</a>

In js script:

$('a[rel*=prettyPhoto]').prettyPhoto({
        keyboard_shortcuts: false,
        social_tools: false,
        deeplinking: false
    });

And in page.html I cannot access myVar. Help?

  • Found similar question here , but it's not answered either.

SOLUTION FOUND : The url parameters you want to pass should be before "iframe" variable. Eg.:

page.html?myVar=text&iframe=true&width=700&height=100%

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM