Skip to content

Instantly share code, notes, and snippets.

@mnelson
Created January 26, 2012 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnelson/1683805 to your computer and use it in GitHub Desktop.
Save mnelson/1683805 to your computer and use it in GitHub Desktop.
$(".call-to-action").live("click",function(e){
try{
register_user_modal($(this).attr("href"));
} catch(err){alert(err);}
e.preventDefault();
return false;
});
function register_user_modal(target_link){
alert("wtf1");
var options = {
open:function(){
$.get(target_link,{},
function(r){
alert("wtf2");
$("#register_user-modal").html(r);
$('.modal-header').append("<a href='' class='close-reveal-modal close'>&#215;<a/>")
return false;
}
)
}
};
create_modal("register_user",options);
alert('wtf3');
$('#register_user-modal').reveal();
alert('wtf4');
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment