www.webdeveloper.com
Results 1 to 3 of 3

Thread: jquery queueing help!

  1. #1
    Join Date
    Mar 2010
    Posts
    38

    jquery queueing help!

    my new website uses jquery! but its buggy and i need help!
    http://patrickallard.net63.net/
    here is the part of the code with the error, its denoted by
    // error here
    when i try to append the openHopin function it doesn't work, if i try to run it strait up with $(this).openHopin it does work.
    but i have to append it because i have to queue it, i cant queue it unless i append it right?
    not that this is just a code snippet for conciseness purposes, it wont run at all on its own, view the website link and look at the bottom of the page for the full jquery script
    tyvm love u guys!
    Code:
    (function() {
    	// function to open or close a window
    	$.fn.OpenToggle = function(binaryBool,row,col,itemWidth,itemHeight,numRows,openHeight,speed,fn) 
    	{
    		//if its open close it
    		if(window[binaryBool])
    		{
    			window[binaryBool]=false;
    			
    			var itemLeft=col*parseInt(itemWidth)
    			var itemTop=row*parseInt(itemHeight)
    			
    			return $(this).animate({
    				'height': itemHeight+'px',
    			}, speed || 400, function() {
    				$.isFunction(fn) && fn.call(this);
    			}).animate({
    				'left': itemLeft+'px',
    				'width': itemWidth+'px',
    			}, speed || 400, function() {
    				$.isFunction(fn) && fn.call(this);
    			}).animate({
    				'top': itemTop+'px',
    			}, speed || 400, function() {
    				$.isFunction(fn) && fn.call(this);
    			});
    		}
    		// if its closed open it
    		else
    		{
    			// close other windows if they are open
    			// error here
    			if(experienceOpen)
    				experience.OpenToggle("experienceOpen",0,0,300,sampleItemHeight,2,experienceHeight,500).OpenHopin;
    			if(educationOpen)
    				education.OpenToggle("educationOpen",0,1,300,sampleItemHeight,2,educationHeight,500).OpenHopin;
    			if(softwareOpen)
    				software.OpenToggle("softwareOpen",0,2,300,sampleItemHeight,2,softwareHeight,500).OpenHopin;
    			if(codesamplesOpen)
    				codesamples.OpenToggle("codesamplesOpen",1,0,300,sampleItemHeight,2,codesamplesHeight,500).OpenHopin;
    			if(referencesOpen)
    				references.OpenToggle("referencesOpen",1,1,300,sampleItemHeight,2,referencesHeight,500).OpenHopin;
    			if(linksOpen)
    				links.OpenToggle("linksOpen",1,2,300,sampleItemHeight,2,linksHeight,500).OpenHopin;
    			}
    	};
    	
    			
    	// funtion to open the window
    	$.fn.OpenHopin = function(binaryBool,row,col,itemWidth,itemHeight,numRows,openHeight,speed,fn) 
    	{
    		return $(this).animate({
    			'top': (sampleItemHeight*numRows)+'px',
    		}, speed || 400, function() {
    			$.isFunction(fn) && fn.call(this);
    		}).animate({
    			'left': '0px',
    			'width': '900px',
    		}, speed || 400, function() {
    			$.isFunction(fn) && fn.call(this);
    		}).animate({
    			'height': openHeight+'px',
    		}, speed || 400, function() {
    			$.isFunction(fn) && fn.call(this);
    		});
    	}

  2. #2
    Join Date
    Mar 2010
    Posts
    38
    anyone?

  3. #3
    Join Date
    Mar 2010
    Posts
    38
    i have made a correction in the code on the site but it still does not work, please someone take a look at it
    the error is still denoted by // error here

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles