SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scriptaculous BlindUp Flicker

    When completed, the original content of the DIV flickers for a second visible before going on with the rest of the function. The ajax and subsequent blinddown work fine though. Any thoughts?

    Code:
    function getShow() { 
        new Effect.BlindUp('ajax2', {  
          duration: 1, 
          fps: 50, 
          afterFinish: function() { 
            document.getElementById('ajax2').style.display = 'none';
    		new Ajax.Updater('ajax2','ajaxContent/teen.html', {  
              asynchronous: true, 
              onSuccess: function() { 
                new Effect.BlindDown('ajax2', {
                  duration: 1,
                  fps: 50,
                  queue:'end'
                })
              } 
            }) 
          } 
        }) 
      }

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've figured it out. I applied a patch suggested in the Scriptaculous wiki, and then used some code to make my function reusable

    Code:
    	var setID = id;
    	var setPath = path;
       
    	new Effect.BlindUp(id, { // the id of the <DIV> containing the photos 
    		duration: .3, 
    		fps: 50, 
    		afterFinish: getAjax 
    		}) 
    	function getAjax() { 
    		new Ajax.Updater(setID,setPath, { // URL for next <IMG> tag 
    			asynchronous: true, 
    			onSuccess: showAjax 
    			}) 
    		}
      	function showAjax() { 
    		new Effect.BlindDown(setID, {
    			duration: .3,
    			fps: 50,
    			queue:'end'
    			})
    		}
    Not pretty, but it works!


Bookmarks

Posting Permissions

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