I can't figure out why is not working a jquery plugin (base64 encode decode) inside an event function.
This way works:
$(document).ready(function(){
data = $.base64Encode('something');
alert(data);
});
But when trying to add in an event function, I get the $.base64Encode is not a function error
$(document).ready(function(){
$('#submit').click(function(e){
data = $.base64Encode('something');
alert(data);
e.preventDefault();
});
});
The Jquery plugin is found at: http://plugins.jquery.com/project/base64