Posts tagged with javascript
Use jQuery to see if an element exists
Published 17 January 2014 in archive with tags javascript , jquery You can use jQuery to see if an element exists by checking if the length of the jQuery object is > zero. Continue reading …Intercept AJAX requests
Published 14 January 2014 in archive with tags javascript , ajax Just a snippet today, a reblog, of an article on how to Hijack AJAX Requests Like A Terrorist by Daniel Huckstep. Continue reading …Get length of associative array in JavaScript
Published 2 January 2014 in archive with tags javascript Something I learnt just now is that JavaScript is funny about arrays. Unless you're using numerical indexes, your array elements will actually become properties of the underlying object. It sucks, but it also kind of makes sense. Continue reading …Detect when ng-options has finished rendering
Published 10 December 2013 in archive with tags javascript , angular If you want to fire an event whenng-options
finishes rendering options, you can do so by watching the model with scope.$watch
and then queuing up the event code to fire on the next digest cycle with scope.$evalAsync
. Like so:
Continue reading …