Home & blog  /  2010  /  Sep  /  view post  /

Blockster update: controlling it with navigation

posted: 11 Sep '10 18:27 tags: block, transition, effect, rotation, slideshow, Javascript, jQuery

Of all my scripts, Blockster has probably got the best response. I've had a lot of e-mails about that one, and one from Andreas Rasmussen recently asked if it could be controlled by navigation rather than just auto-rotate.

This is something I've been meaning to build into it for some time, and now I have. This has meant a slight change in how you call it into your page. The new syntax is:

1blocksterInstance = new Blockster({

2     holder: '#featureRotator_1',

3     rows: 4,

4     cols: 6,

5     random: true

6});

Then, to force it to go to a particular slide and interrupt the auto-rotate, you'd call:

1blocksterInstance.jump(0); //go to slide 1

2blocksterInstance.jump(3); //go to slide 4, etc

Head over here to download, get usage info or view a demo.

You might recognise from the above that Blockster has gone all trendy and become object-orientated, hence it's instantiated with new and assigned to a variable.

So it started life as a rotator, now it can be used as a carousel (though don't forget I just built a proper carousel!).

Enjoy.

post new comment

Comments (11)

Okoweb, at 17/09/'10 09:58, said:
Can i see a demo controlling with navigation?

Thank.
Mitya, at 17/09/'10 10:03, said:
I will add this to the Blockster script page either today or tomorrow. Until then, feel free to give it a go - from the above you can hopefully see how it works.
Okoweb, at 17/09/'10 11:00, said:
Thank.
Jk, at 4/11/'10 13:14, said:
seems like impossible to make it work. the jump function just doesn't react, while the auto-rotation is allright ... any clue ?
Mitya, at 4/11/'10 14:34, said:
Jk - I can help, but I'm not a mind reader. What browser? Any JS error message? URL? Etc etc.
Jk, at 4/11/'10 22:35, said:
Thaks Mitya,

I've sent an email to you with the detail, but for the record and help others that might face the same issue here is my experience :



              

The auto switch is working just fine ...
This is  the  HTML code for the left arrow ... I've tried alert message in the jump function of your script. It doesn't show up, so I guess i am calling it in the wrong way ?

  

Jk, at 4/11/'10 22:37, said:
no error message, safari browser
Jk, at 7/11/'10 11:22, said:
Anybody has an idea what's wrong in my code ?
Mitya, at 7/11/'10 12:57, said:
Jk - try omitting the 'var' keyword when you instantiate Blockster.Can you post a URL?
Jk, at 7/11/'10 13:08, said:
Many thanks Mitya, it works perfectly without the "var" !! 

see it the posted url (also in my mail)

Jk
JC, at 22/09/'11 00:27, said:
Hello,
I am currently implementing a "forward" & "back" button using the blockster script on our homepage, is there a way to add in a "pause" button as well?
post new comment