I'm new in Joomla, I have try to build my Joomla component, however, when I try to include Jquery ptTimeSelect library into front end it shows javascript error
Uncaught TypeError: Cannot read property '_doCheckMouseClick' of undefined
I did a lot google, and did change the place of the code, it seems Joomla automatic ignore part of the code cause this problem(maybe it skipping any code with "_"underscore ), and I did try to rename _doCheckMouseClick to doCheckMouseClick, it show the same kind error message.
here are the code pops error
calling function: line 228 in file
$(document).mousedown(jQuery.ptTimeSelect._doCheckMouseClick);
define function: line 387 in file
/**
* Closes the timePicker popup if user is not longer focused on the
* input field or the timepicker
*
* @private
* @param {jQueryEvent} ev - Event passed in by jQuery
* @return {undefined}
*/
jQuery.ptTimeSelect._doCheckMouseClick = function(ev){
if (!$("#ptTimeSelectCntr:visible").length) {
return;
}
if ( !jQuery(ev.target).closest("#ptTimeSelectCntr").length
&& jQuery(ev.target).not("input.isPtTimeSelectActive").length ){
jQuery.ptTimeSelect.closeCntr();
}
};// jQuery.ptTimeSelect._doCheckMouseClick
Please help