Sublime Forum

How can I use this Code as Snippet for JS?

#1

When I am trying to use, the dollar signs are preventing the code snippet to work properly…

$('.modal').on('hide.bs.modal', function(e) {    
    var $if = $(e.delegateTarget).find('iframe');
    var src = $if.attr("src");
    $if.attr("src", '/empty.html');
    $if.attr("src", src);
});
0 Likes

#2
3 Likes