Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-12-2013, 02:08 PM   PM User | #1
lukinhasb
New to the CF scene

 
Join Date: Feb 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
lukinhasb is an unknown quantity at this point
Calling a slideshow function in another jQuery script

Brothers and sisters,

I have a problem:

When I click "Edit" button, the slideshow should STOP.

So I tried this:

Edit button code (editor-plugin.js):

Code:
    base.prototype.pre_edit_button = function() {
      var _this = this;
      return jQuery('<button>', {
        'class': 'fee-hover-edit',
        'html': FrontEndEditor.data.edit_text,
        'click': function(ev) {
          _this.last_mouse_pos = ev.pageY;
          return _this.start_editing();
        }
      });
          
        };
Slideshow code (header.php):

Code:
    <script type="text/javascript">
      jQuery(document).ready(function($) {
         $('#slideshow ul.slideshow').cycle({
            timeout: <?php echo $slideshowspeed;?>,  // milliseconds between slide transitions (0 to disable auto advance)
            fx:      '<?php echo $slide_transition;?>', // choose your transition type, ex: fade, scrollUp, shuffle, etc...            
            pager:   '#pager',  // selector for element to use as pager container
            pause:   1,	  // true to enable "pause on hover"
            pauseOnPagerHover: 1 // true to pause when hovering over pager link
        });
      });
    </script>

And here's my try:

Code:
    base.prototype.pre_edit_button = function() {
      var _this = this;
      return jQuery('<button>', {
        'class': 'fee-hover-edit',
        'html': FrontEndEditor.data.edit_text,
        'click': function(ev) {
          jQuery(document).ready(function($) {$('#slideshow ul.slideshow').cycle({ timeout: '100000' });});
          _this.last_mouse_pos = ev.pageY;
          return _this.start_editing();
        }
      });
    
    };
But it didn't work :s

Any ideas?

Thanks!
lukinhasb is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:03 PM.


Advertisement
Log in to turn off these ads.