I want to build a simple jQuery plugin, but I don’t know how to start, I read a few articles and even tried to learn code of a few popular plugins, but it draw me even deeper into confusion.
Show me please a starter template. Let’s say for the sake of example I should get something, that I can call like that:
$("a").myMessagePlugin();
Now, everytime somebody clicks a link it should just popup an alert and show that link.
Thank you
The other answers are mostly correct, but if you want to use the dollar sign, wrap it in an anonymous function and pass the jQuery object. Otherwise, you run the risk of conflicting with other libraries.