Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #198549

    I include on my page uploadify js plugin to uploading files using ajax (exactly jQuery) but I cant using any jQuery code on page becouse there will be error “$ is not a function” so propably function $ is overwrited. I change initialization code from
    $(function() {
    to
    jQuery( document ).ready(function( $ ) {
    but it still not working (including uploadify js have the same problem ?)

    Question 1. How to exclude files that overwriting that function in js and if you know write me filenames.
    Question 2. Do you know any solution for that ? Tried jQuery.noConflict and a lot of others solution and still not working.

    #198680

    Hi AdFX!

    Have you tried simply changing that to:

    jQuery(function() {
    
    

    Can you post a link to your website?

    Cheers!
    Josue

    #198945

    Hi, yes i tried a lot of diffrent ways to make that uploadify script working, now i put you way and it placed in that adress:
    http://ad.kinefi.pl/zamowienie
    there is a test adress with the same code and it work http://ad.kinefi.pl/test/uploadify/

    give me a way to solve that please

    #198952

    Hi!

    Wrap your js code into a self executing function like

    
    (function($)
    {
        //my code
    })(jQuery);
    

    and you can use the $ shortcode with the noconflict mode. I.e. in your case the code looks like

    
    	
    	jQuery(function() {
    
    		
    		$('#file_upload').uploadify({
    			'formData'     : {
    				'timestamp' : '1386753645',
    				'token'     : '853cbd34cf4daf06b176c2ec1b170279'
    			},
    			'progressData' : 'speed',
    			'swf'      : 'uploadify.swf',
    			'uploader' : 'uploadify.php'
    		});
    		
    		$('.customize_input_text').live("keyup", function(){
    			count_chars($(this));
    		})
    
    		
    	});
    
    

    replace it with

    
    (function($)
    {
    	$(function() {
    		$('#file_upload').uploadify({
    			'formData'     : {
    				'timestamp' : '1386753645',
    				'token'     : '853cbd34cf4daf06b176c2ec1b170279'
    			},
    			'progressData' : 'speed',
    			'swf'      : 'uploadify.swf',
    			'uploader' : 'uploadify.php'
    		});
    		
    		$('.customize_input_text').live("keyup", function(){
    			count_chars($(this));
    		});	
    	});
    })(jQuery);
    

    Regards,
    Peter

    #199417

    Thanks for you reply Peter but that solution isn’t work :( Now i have in error console two errors:

    Error: TypeError: $(...).uploadify is not a function
    Source File: http://ad.kinefi.pl/zamowienie
    Line: 186

    and (which i think is results from the above)

    Error: TypeError: c is undefined
    Source File: http://ad.kinefi.pl/wp-content/themes/enfold/uploadify/jquery.uploadify.min.js
    Line: 16

    so propably $ is not recognized properly as before :( please, give me some solution for that.

    Have a nice day Peter

    #199510

    Hi!

    I see no obvious reason for this js error – maybe try to deactivate the jquery updater plugin which seems to replace the default (bundled) jquery script with a custom script. If this doesn’t solve the issue I recommend to hire a freelancer from http://www.microlancer.com/ who has more time to tinker around with your code and to investigate the issue.

    Best regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Problem with jQuery’ is closed to new replies.