POC-34 : Fixed a bug which cause the javascript to crash for JQuery version greater than 1.8.2