Geeks With Blogs
hmloo's World of .NET Jquery
How to create Checkboxes that act like Radio buttons with Jquery
I have a post here to show code examples for check/uncheck all checkbox with Jquery. This time I will implement another request that the user should only be able to check at most one of the checkboxes, it's behave like radio buttons. There are 2 cases. Case 1 shows function that has little difference with radio button. It allows the user to deselect checkbox. Case 2 is same as radio button. Case 1 <head id="Head1" runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.m... ......

Posted On Thursday, March 22, 2012 1:22 PM

Replace broken image with noimage icon using Jquery
Sometimes when the image isn't available on server, the web page will show a broken image. so we can display a "no image available" image for good user experience. I will implement it using Jquery. $(document).ready(function() { $("img").error(function() { $(this).hide(); }) .attr("src", "noimage.jpg"); }); Please note that we must first hide the broken image, or else even if we set the src to noimage, it still can not show noimage icon ......

Posted On Tuesday, March 20, 2012 7:23 PM

How to check/uncheck all checkbox with Jquery
There are a lot of solutions for this, but I found most them did not handle the case where user checked or unchecked all of the child checkboxes and it must automatically checked or unchecked the parent checkbox. so I give the following solution: <html xmlns=" <head runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.m... type="text/javascript">&... <style type="text/css"> .cbRowItem {display:block;} </style> ......

Posted On Wednesday, February 15, 2012 2:04 PM

Copyright © hmloo | Powered by: