1. $(".j-linkedin-connect").on("click", function(evt){
evt.preventDefault();
var slideshow_id = $(this).data("slide-id")
bootbox.confirm("Are you sure you want to add this slideshow to your
LinkedIn Profile?", function(confirmed) {
if (confirmed){
$.ajax({
url : "/liconnect/upload_to_li_profile_connected_user",
data : {"slideshow_id" : slideshow_id },
type: "POST",
dataType: "json",
success : function(data){
if(data.success){
var actionBtn = $("#li_upload_" + slideshow_id).text("Added To
LI Profile");
actionBtn.removeClass("j-linkedin-connect");
actionBtn.addClass("disabled");
bootbox.alert("Added upload to LinkedIn Profile");
} else {
bootbox.alert("Oops! There was an error. Please try again
later.");
}
},
failure : function(){
bootbox.alert("Oops! There was an error. Please try again
later.");
}
});
}
});
});