writing jquery plugins ex
by Esther Mun
JavaScript
function show_messge(message) {
console.log(message);
};
var mymessage = "hello, world!";
var mymessge = "goodbye, world";
show_message(mymessage);
$.fn.alert_error = function () {
this.css();
//this. ;
};
$("p").alert_error();
// in this bubble, it's protected from external library.
(function ($) {
$.fn.alert_error = function () {
this.css();
this.mssg = alert("Something's wrong.");
};
}(jQuery));
$('#error_msg').alert_error();