By kahara on
Hi,
can anyone tell me how drupal handles default javascript behaviours, such as mouse up, mouse over etc? Are they stored somewhere and is it possible to override them? I am looking for a way to override mouseover (hover) and turn it in to a default mouseup behaviour.
thank you.
Comments
The general answer is to use
The general answer is to use jQuery and attach the appropriate event you want to the selected elements.
Thanks nevets, perhaps you
Thanks nevets,
perhaps you can help me a bit further. I want to override a hover behaviour that is part of the Views Slideshow module. This is a default setting you can't disable, so I need to do it manually. I've tried locating this behaviour in the module itself but can't find it there, probably because it's a default jquery behaviour or something.
I have limited knowledge of java, but I guess I will be able to adjust things once I've located the source for this hover behaviour.
Any help would be appreciated!
Since the slide can be
Since the slide can be configured in several ways, what is the current behavior you want to override and how do you want to override it?
in my case I created a
in my case I created a slideshow of images with the same taxonomy term, displaying not only the slideshow, but also a thumbnail of every image in the slideshow. here's a link to the site: http://test.roderickhietbrink.nl/work/vivarium
By the way, I completely disabled the automatic slideshow functionality, so the slides don't change automatically.
Now the problem is that when a user moves the mouse over one of the thumbnails, the hover behaviour is activated. I want to override this so that the thumbnails need to be clicked for the slides to change. I've installed the Hoverintent module, which delays mouseover activities and was hoping I could alter the js that comes with this module.
Override these theme functions
We are going to override the theme functions that add the js that handles the hover event.
Note this will change the behavior for all views slide shows to use mousedown/mouseup instead of hover.
After adding the code below make sure you visit Administer › Site configuration › Performance and click the "Clear cached data" button (toward the bottom of the page)
Add the following to your themes template.php file.
thanks!
I inserted the code and it works! The only change I made was to swap mouseup / mousedown, so the link behaves like a normal link, activating on mouseup.
Almost there, one more thing that would make me very happy is to have the mouse pointer turn to a hand when moving over the thumbnails.
As a start try adding this to
As a start try adding this to your themes style.css file
You may need to adjust the selector, the Firefox extension firebug is useful for determining what class or classes to use for the selector.
how simple can it be... I
how simple can it be... I didn't expect this to work, but it does.
Many thanks!!
Drupal Slideshow
do you know the easy way to use slideshow in drupal like http://www.malsup.com/jquery/cycle/begin.html
--
Azhar uddin
Technical Lead
email : engr.azharuddin@gmail.com
skype : computer_jin
The rotor banner module uses
The rotor banner module uses the jquery cycle plugin and has nice views integration.
Thanks to reply, But rooter
Thanks to reply,
But rooter module give us block and i want to use a block in my content and how can i use block withing my content so i need to develop a piece of code which shows me slideshow and i can use it any where in my module....
how can i do this ?
--
Azhar uddin
Technical Lead
email : engr.azharuddin@gmail.com
skype : computer_jin