Archive for the 'jQuery' Category

Unbinding events using jQuery

Recently, I was trying to use jQuery’s .Unbind() function to remove an onclick event handler that was was being bound elsewhere, out of my control. (Basically I wanted to suppress a “click to add a new item” link to force something to be read-only in a 3rd party app.) Frustratingly, I could not seem to get the Unbind() to take effect. I knew my selector was okay, because I could change the background-color of the item I was targeting without issue.

Eventually I googled it and found other people with the same problem. Turns out, jQuery only tracks event handlers that have been bound using jQuery. So, if the event handler was bound declaratively in the HTML markup (or output by some other system/framework), Unbind() won’t touch it (doesn’t know about it unless you used Bind() to add it).

The workaround solution is to use .removeAttr(eventname), such as .removeAttr(“onclick”). This worked for me and stopped me from banging my head on the wall any further. Hopefully it helps you, too.

Advertisements

ebook: 51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls

This book sounds like it will be really practical and useful!  The author tackles issues he’s faced using jQuery with ASP.net controls, and highlights useful combinations of the two.  You can pre-order the ebook today for $10!

51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls

Thanks for the tweet, Dave.  I’m going to go order mine now…

3 Useful jQuery Plugins

Overwhelmed by the massive lists of jQuery plugins out there? Here’s a couple of personal favourite highlights from this 20-item posting:

Humanized Messages

jQueryDescription: Humane Messages is a system for displaying and temporarily logging non-modal messages, for use in web applications. It’s simply a large and translucent message that’s displayed over the contents of your screen. They fade away when the user takes any action. In practice, the message is both noticeable yet unobtrusive.
Demo: Humanized Messages Demo.
Download: Humanized Messages Download

Scott’s thoughts: It’s a great way to give quick and unobtrusive feedback during a long-running interaction.

Featured Content Glider

jQueryDescription:This script lets you painlessly showcase new or featured contents on your page, by turning ordinary pieces of HTML content into an interactive, “glide in” slideshow. For the ultimate in the ability to customize its look, the pagination links are also ordinary links that you define on the page, but with special CSS class names inserted when it should perform a certain task. Visit the homepage to read about all the features. Excellent.
Demo: Featured Content Glider Demo.
Download: Featured Content Glider Download.

Scott’s thoughts: Although the demo linked above uses static content in div’s on the page, you could easily server-enable those div’s for the glider pages and add the content dynamically during the page_load cycle, pulling your featured or most recent items from the database. This would be very slick.

Easy jQuery Pull Quotes

jQueryPull quotes, lift-out quotes, or call-outs are a handy method of drawing reader’s attention to a section of text. This enhances large blocks of text so the user could skim read them without missing the really important parts.
Demo, Download and Details: Easy jQuery Pull Quotes Homepage.

Way more for your perusal…

These are just the few I thought most personally useful.

Please visit the original blog posting (http://speckyboy.com/2008/07/21/20-amazing-jquery-plugins-and-65-excellent-jquery-resources/) for the full list of 20 plugins, plus a whopping 65-item list of tutorials and other resources.

10 Interesting lightweight jQuery plugins

Here’s a nice list of some jQuery plugins.  In particular I could see numbers 2 and 8 being quite handy at times, possibly #1 also.  YMMV.

http://woork.blogspot.com/2009/07/10-interesting-lightweight-jquery.html


Scott’s recent tweets…

Advertisements