I am new to jquery, primefaces and jsf. Also please forgive my language.
In my head tag i have <script src="js/jquery-2.1.1.js"></script>
and <script src="assets/myQuery.js"></script>
myQuery.js contains follwing code
(function($)
{
$(document).ready(function() {
....
});
function switchStylestyle(styleName)
})(jQuery);
this script is used for creating a cookie for css
Also in the same page i have a p:fileUpload controll.
In the beginning the cookie creating worked fine and the fileupload was not working. I mean when i select a file for uploading by clicking choose nothing happens.
So i put following in the head tag (nothing else changed).
<script type="text/javascript">
var $j = jQuery.noConflict(true);
</script>
Now the file upload works fine but the cookie is not created
following is the fileupload controll:
<p:fileUpload id="vaultFileUploader" style="margin-left: -5px;" name="jquery/jquery.js" fileUploadListener="#{myBean.handleFileUpload}" mode="advanced" dragDropSupport="true" label="Choose File" update=":logoChange:companyLogo" sizeLimit="1000000" auto="true" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />
i think the reason for this issue is because of the conlict between the primefaces and jquery.
any helps are welcome...