Ver Mensaje Individual
  #4 (permalink)  
Antiguo 19/07/2010, 20:48
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: Dejar sin efecto una función mediante otra

Otra cosa que he probado y al parecer funciona correctamente es guardar el contenido del div y luego restaurarlo para hacer el reset. Algo como esto:
Código Javascript:
Ver original
  1. function formatText(index, panel) {
  2.     return index + "";
  3. }
  4.  
  5. function startSlider() {
  6.     var obj = $(".anythingSlider");
  7.     obj.data("lastcontent", obj.html());
  8.     obj.anythingSlider({
  9.         easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
  10.         autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
  11.         delay: 3000,                    // How long between slide transitions in AutoPlay mode
  12.         startStopped: false,            // If autoPlay is on, this can force it to start stopped
  13.         animationTime: 600,             // How long the slide transition takes
  14.         hashTags: true,                 // Should links change the hashtag in the URL?
  15.         buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
  16.         pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
  17.         startText: "Go",             // Start text
  18.         stopText: "Stop",               // Stop text
  19.         navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
  20.     });
  21. }
  22.  
  23. function stopSlider() {
  24.     var obj = $(".anythingSlider");
  25.     obj.html(obj.data("lastcontent"));
  26. }
  27.  
  28. $(function () {
  29.     startSlider();
  30.    
  31.     $("#slide-jump").click(function(){
  32.         $('.anythingSlider').anythingSlider(6);
  33.     });
  34. });
De modo que llames a stopSlider() para volver al contenido original y startSlider() para volver a iniciarlo.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.