www.checkoutchristchurch.co.nz live!
www.checkoutchristchurch.co.nz is now live! this site loads in my personal photos of christchurch from flickr and loads in my tweets + all tweets that have the keyword “christchurch”. It uses jquery for scrolling through the thumbnails using your mouse wheel and various jquery plugins for twitter and flickr. Check it out! List of JQuer plugins [...]
Limiting the number of text in textarea using JQuery
example: <textarea id=”id” maxlength=”255″></textarea> jQuery(‘textarea[maxlength]‘).keyup(function() { var max = parseInt(jQuery(this).attr(‘maxlength’)); if (jQuery(this).val().length > max) { jQuery(this).val(jQuery(this).val().substr(0, jQuery(this).attr(‘maxlength’))); } if (jQuery(this).parent().find(‘.charsRemaining’).length > 0) jQuery(this).parent().find(‘.charsRemaining’).html(‘You have ‘ + (max – jQuery(this).val().length) + ‘ characters remaining’); else jQuery(this).parent().append(‘<div class=”charsRemaining”>You have ‘ + (max – jQuery(this).val().length) + ‘ characters remaining</div>’); });
JQuery Event Delegation
Came across a awesome way of handling events using JQuery’s event delegation methods. I have a list of A tags grouped in a table, and each A tag will call a method and pass a ID based on a value in the same column of that A tag. jQuery(“#tableId”).click(function(event) { var $target = jQuery(event.target), target [...]


