Click me - I'm collapsible!

$(document).ready(function(){ $(".openpop").click(function(){ var x = $(this).attr('href'); alert(x); y = x.replace('#', ''); alert(y); $(".popup").toggle(); $("iframe").attr("href", y); }); $(".close").click(function(){ $(this).parent().fadeOut("slow"); }); }); Link 1 Link 2 Link 3