angular.element vs document.getElementById or jQuery selector with spin (busy) control

I’m using the “Angularised” version of the Spin control, as documented here: http://blog.xvitcoder.com/adding-a-weel-progress-indicator-to-your-angularjs-application/ One of the things I don’t like about the shown solution is the use of jQuery in the service that effectively attaches the spin control to the DOM element. I would prefer to use angular constructs to access the element. I’d also … Read more

Why define an anonymous function and pass it jQuery as the argument?

The two blocks of code you have shown are dramatically different in when and why they execute. They are not exclusive of each other. They do not serve the same purpose. JavaScript Modules This is a “JavaScript Module” pattern, implemented with an immediately invoking function. http://addyosmani.com/resources/essentialjsdesignpatterns/book/#modulepatternjavascript http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth The purpose of this code is to provide … Read more

How can I expand and collapse a

Okay, so you’ve got two options here : Use jQuery UI’s accordion – its nice, easy and fast. See more info here Or, if you still wanna do this by yourself, you could remove the fieldset (its not semantically right to use it for this anyway) and create a structure by yourself. Here’s how you … Read more