powered by myself

Monthly Archives: September, 2008

Mutually exclusive checkboxes with jQuery

I was needing a way for the user to select none or just one item in a set… here is how I’ve managed to achieve this functionality using jQuery: <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript" language="javascript"> $(document).ready(function() { $(‘.mutuallyexclusive’).click(function () { checkedState = $(this).attr(‘checked’); $(‘.mutuallyexclusive:checked’).each(function () { $(this).attr(‘checked’, false); }); $(this).attr(‘checked’, checkedState); }); }); [...]

jQuery Autocomplete + JSON + ASP.NET MVC

It just took me a while to get this running, so maybe this could save you some time. The requirement was to use the jQuery Autocomplete plugin to aid in the selection of some data coming from a database in an application using ASP.NET MVC Preview 4. If you would like to see this plugin [...]

Keep in touch

Categories