2015-07-13 68 views
0

我要开prettyPhoto一个iframe,希望优化URL如何从prettyPhoto URL

<a href="iframe.html?iframe=true&width=100&height=100"> 

我试图通过jQuery但一类添加到链接,并传递参数删除GET参数不工作。

$("a.iframe']").prettyPhoto({ 
     iframe: true, 
     width: '100%', 
     height: '100%' 
    }); 

那么有没有办法摆脱url中的这些参数?

回答

0

prettyPhoto允许您设置默认的宽度/高度是这样的:

$("a.iframe']").prettyPhoto({ 
    default_width: 100, 
    default_height: 100 
}); 

该文档不容许任何其他选项来设置这些dimentions。 你可以阅读docs and see the full list of options here

0

我对这个漂亮的照片js没有太多的想法。但是我认为你没有把类名称给锚链接,所以jQuery函数在你的代码中没有被调用。请用下面的锚链接替换锚链接。

<a href="iframe.html?iframe=true&width=100&height=100" class="iframe"> 

感谢, 阿米特生主