#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    103
    Rep Power
    6

    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
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    103
    Rep Power
    6
    anyone?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    103
    Rep Power
    6
    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

IMN logo majestic logo threadwatch logo seochat tools logo