SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    625
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Add Different EFFECT instead of OPACITY

    Hi

    this is my slider code

    Code:
    <script type="text/javascript">
    	$(document).ready(function(){
    		$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    	});
    </script>
    Can i replace OPACITY with any other effect like zoom or blindz etc ?

    vineet

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by vinpkl View Post
    Can i replace OPACITY with any other effect like zoom or blindz etc ?
    The tabs code shows the following for fx:

    Code:
    fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
    The fx can either be an array with hide effect and show effect, or a object.

    Code:
    if ( o.fx ) {
    	if ( $.isArray( o.fx ) ) {
    		hideFx = o.fx[ 0 ];
    		showFx = o.fx[ 1 ];
    	} else {
    		hideFx = showFx = o.fx;
    	}
    }
    And the effect can be anything that can be animated by jquery.

    Code:
    var hideTab = hideFx
    	? function( clicked, $hide ) {
    		$hide.animate( hideFx, hideFx.duration || "normal", function() {
    			...
    		});
    	}
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •