[jQuery] Using append() - each element or string of HTML?
Just wondering from an efficiency standpoint: I am building a widget out of javascript and so there is a lot of HTML. Am I better off creating it as a string, then append() it into the document, or should I build the widget itself using append() and other related helper functions?
[jQuery] Problem animating with marginLeft...
I have this: $('#mydiv').animate({marginLeft:100}, 500); it works just fine in Firefox and Safari. In IE (6 and 7) I get "Invalid argument". If I use this instead: $('#mydiv').css({marginLeft:100}); It works in ALL browsers, including IE. What's wrong? The comment above the animate() function even uses marginLeft as an example
[jQuery] How to animate percentage?
how do I make something like this: $('#element').animate({marginLeft:25}, 500); by percent, instead of 25 pixels?