Blog

Thursday, July 28, 2011
Nice jQuery plugins
I've been working on a web page for the last couple of days that has to do a bunch of stuff client-side, so I've been relying more on JavaScript and jQuery, rather than the usual ASP.NET Web Forms stuff I'm used to.

Here's a list of three relatively simple jQuery plugins that I'm using. I've found that, when looking for a way to do something in JavaScript/jQuery, there are usually several options. There are a lot of plugins out there. Some of them are well-written, cross-browser compatible, small, and quick. Others are a little buggy. These three appear to be in the former category.

Watermark plugin for jQuery -- We usually use the Ajax Control Toolkit watermark extender. This seems to work just as well, with minimal effort.

jquery-color -- I wanted to do some simple color animations on this page. Basically, I wanted to just briefly highlight a new entry with a color background, then have that background color fade out. This can be done with jQuery UI, but that's a heavy bit of code to include, if you don't really need it all. This plugin took a while to track down. The page for this at plugins.jquery.com just has a bunch of dead links on it. And searching for jquery color animation on Google mostly leads you astray. I found links to jquery-color on a couple of Stack Overflow questions.

simplepager -- I'm displaying a list of comments on the page, and I needed to have a way to display them 10 at a time and page through them. This, again, is something that would be easy for me to do server-side with a ListView and DataPager, but I hadn't really had to do it client-side before. There's one site I worked on recently where the original author had implemented his own custom pager, but I didn't want to use that code if I could avoid it. (Not that there was anything wrong with it, but it was well-integrated into that specific instance, and would have required work to generalize.) I had to make a minor change to this plugin, and I'm thinking that maybe I should submit it back to the author and see if he'll merge it into the release version. I probably need to create an account on Github to do that, but that wouldn't be a bad idea anyway.

Labels:

posted by Unknown 7:56 AM
0 comments

Comments: Post a Comment


This page is powered by Blogger. Isn't yours?
© 2011 Andrew Huey