www.webdeveloper.com
Results 1 to 4 of 4

Thread: jquery animate callback function

  1. #1
    Join Date
    Mar 2010
    Posts
    38

    jquery animate callback function

    my website is comprised of tabs that open and close when u click on them
    http://patrickallard.net63.net/
    works pretty good, but when u click on a new tab and a different one is open, its supposed to close the current tab and open the one u clicked on. it does not.
    the error is denoted in the code with 2 comments:
    //error function call
    //error in function
    ty in advance for ur help
    the code is embedded jquery javascript, u can look at the page source to access it

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,633
    javascript is case sensitive

    Code:
    ...
    // close a tab then open another
    	$.fn.CloseOpen = function(currentTab,newTab) 
    	{
    		return $(this).animate
    		(
    			{
    				'height': tabHeight+'px',
    			}
    			, defaultSpeed || 400
    		)
    		.animate
    		(
    			{
    				'left': currentTab.left+'px',
    				'width': tabWidth+'px',
    			}
    			, defaultSpeed || 400
    		)
    		.animate
    		(
    			{
    				'top': currentTab.top+'px',
    			}
    			, defaultSpeed || 400
    			,"swing"
    			,function()
    			{
    				newtab.toggle();
    				//error in function
    				newtab.div.OpenHopin(newtab);
    			}
    		);
    	}
    ...
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

  3. #3
    Join Date
    Mar 2010
    Posts
    38
    ive been wrestling with this problem for months
    no words can express my gratitude
    or my embarrassment lol

  4. #4
    Join Date
    Mar 2010
    Posts
    38
    huge visual bug in samsung s3 phones, anyone familiar with div resizing image bug in s3 phones?

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