All posts tagged jquery

why I love Jquery?

For past few years I was really enjoyed to play around JQuery by working/making/fixing. Even now I personally believe JQuery is one the best java-script library/frameworks so far. I am not sure when I start working with her for the first first time, but she was referred to me  by Ajith.


Most best features I love in Jquery are

  • Opensourse
  • Simplicity: Even a beginner be expert in few hours to days time depending on the time.
  • Reliable Core File : which have support across multiple platforms.
  • Availability of plugins : There are millions of JQuery plugins are available in Market.
  • Availability of Millions supporters to help you in internet.
  • Only basic features in the core/Yet all basic needs.
  • Availability of UI, which we can theme/customize with their site. It includes all basic needed in your day to day life.
  • Mobile Platform NEW

Continue reading →

Javascript Replace All method

While working on my latest project requirement I found a strange issue in basic Javascript. replace method is not replacing all occurrence of the search key, it just replacing the first occurrence.


   var teststring = 'test test string';
    teststring .replace('test','test2');

will give you only ‘test2 test string’ not the expected one ‘test2 test2 string‘.

In order to get expected result we must  userregular expressions as below

var teststring = 'test test string';
teststring .replace(/test/g,'test2');

which will give u ‘test2 test2 string

Continue reading →