Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SyntaxError: invalid regular expression flag l

    Hi everybody. I am using a plugin and I keep getting errors on the javascript since I moved it to the parent domain. When it was on a subdomain the javascript worked perfectly but now I am having all sorts of problems.

    The main error I keep getting with the actual plugin file is
    SyntaxError: invalid regular expression flag l

    Here is the part of the code that it is referencing:
    Code:
      if (1 < a.pagingCount)
                                for (var n = 0; n < a.pagingCount; n++) g = "thumbnails" ===
                                    c.controlNav ? '<img src="../_layout/js/flexslider/%27+a.slides.eq(n).attr("data-thumb")+'
                            :"/>':" < a > "+b+" < /a>",a.controlNavScaffold.append("<li>"+g+"< /li>"),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("
                            a, img ",s,function(b){b.preventDefault();var b=d(this),g=a.controlNav.index(b);b.hasClass(e+"
                            active ")||(a.direction=g>a.currentSlide?"
                            next ":"
                            prev ",a.flexAnimate(g,c.pauseOnAction))});r&&a.controlNavScaffold.delegate("
                            a ",
    It points specifically to the second </li> in the 4th & 5th line ("<li>"+g+"< /li>")

    I also get an error for the plugins.js file ReferenceError: jquery is not defined
    Code:
    (function($){
    	
    	
    	jquery(document).ready(function(){
    	//////////////////////////////////////////////////////////////////////////////////////////////////////////////						   
    		
    		// -------------------------------------------------------------------------------------------------------
    		// Select Nav - converts your website navigation into a select drop-down menu | 
    		// -------------------------------------------------------------------------------------------------------
    		
    		selectnav('dropdown-menu', {
    			label: 'Menu',
    			nested: true,
    			indent: '-'
    		});
    		
    		// -------------------------------------------------------------------------------------------------------
    		// Imagebox - Responsive Lightbox |
    		// -------------------------------------------------------------------------------------------------------
    		
    		imagebox.build();
    		
    		// -------------------------------------------------------------------------------------------------------
    		// FlexSlider - responsive slider |
    		// -------------------------------------------------------------------------------------------------------
    		
    		$('.flexslider').flexslider({
    			animation: "fade",            //String: Select your animation type, "fade" or "slide"
    			slideshow: true,              //Boolean: Animate slider automatically
    			slideshowSpeed: 7000,         //Integer: Set the speed of the slideshow cycling, in milliseconds
    			initDelay: 0,                 //Integer: Set an initialization delay, in milliseconds
    			pauseOnAction: true,          //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
    			pauseOnHover: false,          //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
    			video: false,                 //Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
    			// Primary Controls
    			controlNav: true,            //Boolean: Create navigation for paging control of each clide?
    			directionNav: false,           //Boolean: Create navigation for previous/next navigation? (true/false)
    			prevText: "Previous",         //String: Set the text for the "previous" directionNav item
    			nextText: "Next"              //String: Set the text for the "next" directionNav item
    		});
    		
    		// -------------------------------------------------------------------------------------------------------
    		// Dynamic Carousel - Responsive Carousel |
    		// -------------------------------------------------------------------------------------------------------
    		
    		/*next / prev nav carousel */
    		$('#carousel-slider1').carousel({
    			slider: '.carousel-slider',
    			slide:  '.carousel-slide',
    			nextSlide : '.carousel-next',
    			prevSlide : '.carousel-prev',
    			addPagination: false,
    			addNav : false
    		});
    
    		/* paged navigation carousel */
    		$('#carousel-slider2').carousel({
    			slider: '.carousel-slider',
    			slide: '.carousel-slide',
    			addNav: false,
    			addPagination: true,
    			speed: 300 // ms.
    		});
    
    	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
    	});
    
    })(window.jQuery);
    
    // non jQuery plugins below
    I appreciate any help that any of you might be able to provide. Thank you.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,047
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Should be jQuery not jquery.

    Or simply $ since it is passing jQuery as $ parameter.
    Code:
    function($){
    	
        $(document).ready(function(){
        ...
    
    })(window.jQuery);
    For the first error, I still need to look at it more closely at the code is hard to read.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,047
    Thanks
    0
    Thanked 251 Times in 247 Posts
    There is a space in between "<" and "/li>"

    Code:
    a.controlNavScaffold.append("<li>"+g+"< /li>")
    although I don't think that is the cause of the error but it's good to fix that. Other than that it's really hard to pinpoint where the error is as the code looks minified and hard to read.

  • #4
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    Should be jQuery not jquery.

    Or simply $ since it is passing jQuery as $ parameter.
    Code:
    function($){
    	
        $(document).ready(function(){
        ...
    
    })(window.jQuery);
    For the first error, I still need to look at it more closely at the code is hard to read.
    Thank you very much for your help. On the second error, I changed it to jQuery (feel silly about that one) but now I am getting this error in that same js file TypeError: $(...).flexslider is not a function

    Any ideas? I very much appreciate your time.

  • #5
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    There is a space in between "<" and "/li>"

    Code:
    a.controlNavScaffold.append("<li>"+g+"< /li>")
    although I don't think that is the cause of the error but it's good to fix that. Other than that it's really hard to pinpoint where the error is as the code looks minified and hard to read.
    Thank you. I fixed it and it is still giving me the same error, as you suspected. I understand that the code in that first error is hard to read. I appreciate your time.

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,047
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Quote Originally Posted by anniehall View Post
    now I am getting this error in that same js file TypeError: $(...).flexslider is not a function
    This means that the flexslider plugin js is not included on the page.

  • #7
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    This means that the flexslider plugin js is not included on the page.
    Oh, good to know. Thanks. I assume this is because of the first error.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •