0
Welcome Guest! Login
0 items Join Now

Short JQuery Request

    • MP SOLUTIONS's Avatar
    • MP SOLUTIONS
    • Jr. Rocketeer
    • Posts: 45
    • Thanks: 0
    • Web Designer/Coder/Developer

    Short JQuery Request

    Posted 12 years 11 months ago
    • Hi Forum, hi folks,

      I have installed Voxel and everything works great for me. I wrote some small functions and now my client wants to have an auto triggered link. I thought I could solve it with the following code (It needs to be delayed for about 2,5 - 3 seconds)
       
      <script type="text/javascript">
      $(document).ready(function(){ 
        $('#black_link').wait().trigger({'click'},2500); 
      });
      </script>
       

      But is doesn't work.

      Without the ".wait" it works and the link gets triggered (but immediatelay). What is wrong in my code?
      I would be very thankful for any suggestion how I will need to change this.

      Thanks ahead to everyone who will reply!
      Peter
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Short JQuery Request

    Posted 12 years 11 months ago
    • I haven't really looked into jquery yet (it's on the endless list of thinks to check)

      but to delay a click in mootools this should work

      <script type="text/javascript">window.addEvent('load', function(){ $('hot').fireEvent('click'); }.delay(5000));</script>

      obviously #hot is the element that gets the click ... (for example to open a rokbox)
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Short JQuery Request

    Posted 12 years 11 months ago
    • btw ... bad idea to ask for query since Djamil is a Mootools core developer ... :-)

Time to create page: 0.053 seconds