makfak

makfak supports this item

Supported

27 comments found.

It works, thanks makfak. By the way, I found a conflict between easinghttp://gsgd.co.uk/sandbox/jquery/easing/ plugin and jQuery toolshttp://flowplayer.org/tools/download/index.html, I know it’s not your business, just show it out.

Thanks again.

Has this been tested with the iPad?

The iPad, having a mostly standard HTML , CSS, JS compliant browser (Safari) shouldn’t have any trouble with SF2 .

That said… the JS refresh rate on the iPad is less than that of a non-mobile browser meaning animations will likely be jerky or seem to jump (depending on animation duration). Also, since SF2 has hover gestures, the way the iPad remaps hover gestures to ‘tap’ gestures will likely lead to less-than-intuitive interactions.

SF2 has robust-enough configurations that you should be able to customize SF2 to better match the iPad gesture set.

Good luck.

Wonderful Jquery!But,I’ve a question that how can I let the links open in a new window?Beg ur help.Thx! PS:I get the older version in this page: http://preview.zcool.com.cn/code/new_code/071/

Set “activeWindowIsLink” to false to prevent the native click events and use the endCreateFunction option to create new ones. It should look like this…

jQuery('#preFeature2').siteFeature2({
    activeWindowIsLink: false,
    endCreateFunction: function(options){
        $('#' + options.contentIdPrefix + 'Container').css({'cursor':'pointer'}).click(function(e){
            if(e.target.tagName == 'A'){
                return;
            } else {
                window.open($('#' + options.btnIdPrefix + 'Container div',obj).children().filter('.current').attr('rel'),'_blank');
                return false;
            }
        });
    }
});

To make the links that appear inside the captions open in a new window, just give them a target=”_blank”.

Let me know if you have any further questions.

It works. Thx very much! U R so kind and nice!

Is there a way to start on a different “panel” when you click from a link from a different page?

What I want to do is on my front page show 4 different links. Each link goes to the same page with the sitefeature, but each link should start on a different “panel”. ie link 1 starts on panel 1, link 2 starts on panel 2 etc…

SiteFeature2 doesn’t support this natively but it can be accomplished fairly easily with the “endCreateFunction” parameter. The code below is less than ideal, but it should give you a place to start.

The snippet below looks for a hash (”#”) on the URL . It then looks for a button Id that matches the hash. If it finds one, that button is clicked. The “setTimeout” is there because “endCreateFunction” fires before the events are bound. We need to wait for the events before we can trigger them.

$('#preFeature2').siteFeature2({
    endCreateFunction: function(sfobj){
        if(document.location.hash.indexOf('#SFbtn') !== -1){
            window.sfobj = sfobj;
            setTimeout(function(){
                $sf.find( '#' + window.sfobj.btnIdPrefix +'Container' ).find( document.location.hash ).click();
            },100);
        }
    }
});

Note the document.location.hash.indexOf(’#SFbtn’) in the snippet above. This assumes you’re using the default “btnIdPrefix”. All you have to do is use the button’s Id (eg: SFbtn2, SFbtn0, etc…) as your URL hash.

http://www.mydomain.com/mypage#SFbtn4

I hope this helps.

I get this error:

’$sf’ is undefined

Sorry about that.

Replace $sf with $(’#’ + window.sfobj.outputElementId)

Eh.. I don’t think the demo is functioning well. I see 4 pictures and a lot of sample code, but nothing like I guess it should look like.

You’re right. The javascript isn’t firing. I’ll look into it and get it fixed asap. Thanks for letting me know.

Hey,

Just wanted to let you know the demo for siteFeature2 still isn’t working.

Cheers,

Thanks for the heads-up.

The siteFeature2 demo that I downloaded is not working. As you mentioned above, it looks like “The javascript isn’t firing.” :-)

by
by
by
by
by
by