Grunt JS

Use it to Automate the Tasks as much as possible with Grunt. example: 1) JsHint               2)  Minification process               3)  Execute the test cases Key Notes: Always run the tests on the dist (production) javascript code, not on your source code. Comparison with Gulp: Gulp can also a good task runner. However, Its not necessary to migrate […]

Preventing Xss Attack in Client Side

If users are allowed to enter html content via a textfield or any other UI element,Chances are that your application might be prone to XSS Attack. Let us see,How we can Prevent XSS Attack in Such Scenarios 1)Html Encode(a.k.a Html Escape) the content entered by the user in the text field.Following function will come in […]

person pradeepin2access_time June 5, 2012launch Read More

jQuery’s $.animate() API ‘s drawbacks

While working with jQuery animate() API, Following are the issues,I faced. 1) CSS ClassName cannot be added. $.animate(className,1000); I feel this is a biggest draw back of the animate() api. because we need to add css properties in the following tricky way,instead of adding ClassName straight away Usage: $(“#foo”).animate({  “margin-left” : “40px”,  “width” : “300px” }, 1000); Solution: […]

Use document.getElementById instead of $(‘#Id’)

Three years back,I used prototype.js extensively. In prototype.js ‘$’ is used instead of document.getElementById(“”).But In these three years,I moved from prototype to jQuery,due to its awesomeness. I will write a separate post about “Why I love jQuery than Prototype.js”. When I started using jQuery,Due to my Prototype.js background, I used $(‘#id’) extensively.But when i looked […]

jQuery.attr() Issues in jQuery 1.6

When I Upgraded my jQuery Version from  1.4.2 to 1.6 . Suddenly, My Custom implementation of  Table Row Reordering Via Drag n Drop Plugin , which was working before, started breaking. After a close Inspection into the issue.Issue is raised due to the API Change made by jQuery in version 1.6 Following is the big […]

person pradeepin2access_time July 8, 2011launch Read More