<mySearch ⁄>
<myBlog show="last" ⁄>
<myPhoto order="random" ⁄>
<mySnippets order="rand" ⁄>
<mySnippets type="lang" ⁄>
<myQuote order="random" ⁄>Controle a sua emoção, ou ela o controlará.
<myContacts ⁄><email ⁄>
<windows live messenger ⁄>
<myCurriculum type="pdf" ⁄>
<myVisitorsMap ⁄>Creating a plugin for jQuery is incredibly simple and is a very useful way to abstract complex behaviours so that they can be used repeatedly as part of your jQuery "chains".
But, when the time comes, and you're faced with the decision to either create a jQuery plugin or to simply create a regular function, everything suddenly becomes quite complicated. First, you'll wonder whether the piece of behaviour you want to abstract is best kept under the jQuery namespace, and then you'll doubt its applicability to the DOM-centred jQuery chain, and then sometimes you'll recede to something you're much more comfortable with, a regular ol' JavaScript function.
If we forget about the plugins available online, and we simply focus on your plugins, made and used within a specific project, then the question of whether a plugin is really the right route becomes all the more difficult to answer. Are you going to benefit from extending jQuery's API? Will the readability of your code benefit?
este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:
http://james.padolsey.com/javascript/macros-in-jquery/
<myNews show="rand" cat="programacao" ⁄>