/ blog


Character Count with jQuery

jQuery $(‘textarea’).each(function(){ // get current number of characters var length = $(this).val().length; // get current number of words //var length = $(this).val().split(/\b[\s,\. ..

Read more

How to Scroll to the Top Smoothly with jQuery

jQuery Just a quick and smooth snippet to go to the top of page with jQuery. <script type="text/javascript"> $(document).ready(function() { $(‘.backtotop’).click(function() ..

Read more

Simple alert box on iPhone Apps – Xcode

UIAlertView *someError = [[UIAlertView alloc] initWithTitle: @"Network error" message: @"Error sending your info to the server" delegate: self cancelButtonTitle: @"Ok" otherButtonTitles: nil];  ..

Read more

How to add a surcharge to the Amex option for the checkout form in the Online Store – Business Catalyst

Use onchange to alert the customer that a charge will occur and then the function doMath() calculates the surcharge. JavaScript <script type="text/javascript"> function checkSel(obj) { ..

Read more

Preloading Images with jQuery

jQuery <script type="text/javascript"> jQuery.preloadImages = function(){ for(var i = 0; i< arguments.length;> < /arguments.length;> { jQuery("< img alt="" />").attr("src" ..

Read more

1 2 3 4