gpt4 book ai didi

javascript - jquery点击简单模态插件

转载 作者:行者123 更新时间:2023-11-30 06:45:24 25 4
gpt4 key购买 nike

我想使用简单的模式插件将一个变量传递到我的 javascript 中,http://www.ericmmartin.com/projects/simplemodal/ , .click 函数在我的 View 中 (html) ... 这是我的 javascript:

$('#basic-modal .basic').click(function (e) {
var src = "http://365.ericmmartin.com/"
$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
closeHTML:"",
containerCss:{
backgroundColor:"#fff",
borderColor:"#fff",
height:450,
padding:0,
width:830
},
overlayClose:true
});
return false;
});

这是我在 html 中尝试的内容:

%a.basic{:href => "#", :onclick => 'var src = "http://somesite.com/"'}

最佳答案

Jquery Dialog已经为您构建了这个确切的功能。我强烈建议您尝试这种方法:

http://jqueryui.com/demos/dialog/

关于javascript - jquery点击简单模态插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7366157/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com