Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.popup-modal').on('click', function(){
- var comp = $(this).closest("article").find("h1 a"),
- url_ = comp.attr("href"),
- tit_ = comp.text();
- $("#test-modal div b").text('Título do post: '+tit_);
- $("#test-modal a").each(function(){
- var href = $(this).attr("href");
- $(this)
- .attr("href",
- href.substring(0, ~href.indexOf("facebook") ?
- href.indexOf("u=")+2 :
- href.indexOf("url=")+4)
- +url_);
- });
- });
Add Comment
Please, Sign In to add comment