I'm trying to minify a JavaScript file for my website but this part of the code in the snippet is causing errors when it minifies.
//do not hide if click on the label object associated to the select
Do I need this part of the code or is it an important command for the code. If I do need it, do I need to add anything to it in order to minify correctly?
/* Hide all open selects */ var jqTransformHideSelect = function(oTarget){ var ulVisible = $('.jqTransformSelectWrapper ul:visible'); ulVisible.each(function(){ var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0); //do not hide if click on the label object associated to the select if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();} }); };
It's a comment. You can remove it. Check out this article on JavaScript comments .
Also, you can lint it to see if there are any issues. I linted it for you:
Make sure you've included jQuery and all that good stuff.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.