开发者

how to get the content of the page in an modal using colorbox jquery plugin?

开发者 https://www.devze.com 2023-03-20 20:47 出处:网络
I am having a page with print icon in there. Now, I need to grab that class and pull the content of that page in an modal using colorbox and than change the print class to a new name so that i can exe

I am having a page with print icon in there. Now, I need to grab that class and pull the content of that page in an modal using colorbox and than change the print class to a new name so that i can execute actual print by window.print. Is there a way I can pull t开发者_运维知识库he content from present page using $("selector").html() and place inside the modal. Moreover, I need to pull the css as well.

thanks in advance for any suggestions.


You can set the html of an object to the html of another object:

$('#modal_dialog').html($('selector').html());
0

精彩评论

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