I\'ve got a couple of hyperlinks that each have an ID attached. When I click on this link, I want to open a modal ( http://twitter.github.com/bootstrap/javascript.html#modal
This is how you can send the id_data to a modal :
And the javascript : $(function () { $(".modal-btn").click(function (){ var data_var = $(this).data('some-id'); $(".modal-body h2").text(data_var); }) }); 0 讨论(0) 查看其它12个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
And the javascript :
$(function () { $(".modal-btn").click(function (){ var data_var = $(this).data('some-id'); $(".modal-body h2").text(data_var); }) });