Simple jQuery Show More plugin

Well, there are an awful lot of plugins for such purpose. Why would I want to reinvent the wheel? Maybe I wanted to know how a jQuery plugin works or maybe I just had too much time on my hands.

Anyways, let’s try to get to the real part here. You can download the plugin from the link below but there are a couple of things that you can remember and create better plugins and which will make it really easy to maintain it.

Always define a common handler variable for use throughout the plugin code. Like so:

In the above line I declared the variable plugin as a handler that references to the jquery object I’m working with. Nextly, provide as much plugin default as possible since there are many developers who are lazy(like me) and do not wish to modify or extend the core plugin code.

alexey

alexey

Application developer, movie buff, occasional reader and a huge Manchester United fan.
alexey
Share

Application developer, movie buff, occasional reader and a huge Manchester United fan.