delps hi, my suggestions may help you. try using the specific selector for jQuery library (jQuery), because Liferay also has a javascript library like yui and others.if you use ($) selector, that's can make your function not run well.Example :