Created
April 29, 2015 09:03
-
-
Save AaronLayton/db9ac42c24d16edd8b20 to your computer and use it in GitHub Desktop.
For Andrew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = { | |
url: url, | |
data: data, | |
success: function(data) { | |
if (data.error) { | |
if (data.error.message.indexOf("Please log in") != -1) { | |
$('.quick-account-login a:eq(0)').trigger('click'); | |
} else { | |
alert(data.error.message); | |
} | |
} else { | |
thisButton.addClass("in-wishlist").find(".glyphicon-heart-empty").removeClass("glyphicon-heart-empty").addClass("glyphicon-heart"); | |
} | |
thisButton.removeAttr("data-loading"); | |
}, | |
error: function() { | |
alert("There has been an error\nPlease refresh and try again"); | |
thisButton.removeAttr("data-loading"); | |
} | |
} | |
var MaterialPopup = MaterialPopup || {}; | |
MaterialPopup.OpenPopup = function(){ | |
}; | |
(function($){ | |
var private = "no one can see this"; | |
function OpenPopup(){ | |
console.log("I can use the " + private); | |
} | |
window.MaterialPopup = { | |
OpenPopup: OpenPopup | |
} | |
})(jQuery, window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment