Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problem z sliderem i lightboxem
Forum PHP.pl > Forum > Po stronie przeglądarki > JavaScript
szlipek
Witam mam problem z sliderem ("anythingslider") i jquery.lightbox oba skrypty współpracują na jquery z tym że jeden na jquery zwykłym a drugi na jakimś jquery.min.js. i gdy wstawiam odnośnik do pliku jquery przed sliderem to działa slider a gdy go wklejam przed lightboxa to lightbox działa a za to slider nie działa. Ma ktoś jakiś pomysł jak to rozwiązać?.Kod wygląda tak:
  1. <script type="text/javascript" src="$config[dir_core]jquery.js"></script>
  2. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  3. <script type="text/javascript" src="$config[dir_core]jquery.easing.1.2.js"></script>
  4. <script src="$config[dir_core]jquery.anythingslider.js" type="text/javascript" charset="utf-8"></script>
  5.  
  6. <script type="text/javascript">
  7.  
  8. function formatText(index, panel) {
  9. return index + "";
  10. }
  11.  
  12. $(function () {
  13.  
  14. $('.anythingSlider').anythingSlider({
  15. easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin
  16. autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not.
  17. delay: 3000, // How long between slide transitions in AutoPlay mode
  18. startStopped: false, // If autoPlay is on, this can force it to start stopped
  19. animationTime: 4500, // How long the slide transition takes
  20. hashTags: true, // Should links change the hashtag in the URL?
  21. buildNavigation: true, // If true, builds and list of anchor links to link to each slide
  22. pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover
  23. startText: "Start", // Start text
  24. stopText: "Stop", // Stop text
  25. navigationFormatter: formatText // Details at the top of the file on this use (advanced use)
  26. });
  27.  
  28. $("#slide-jump").click(function(){
  29. $('.anythingSlider').anythingSlider(6);
  30. });
  31.  
  32. });
  33. </script>
  34. <script type="text/javascript" src="$config[dir_core]jquery.lightbox-0.5.js"></script>
  35. <script type="text/javascript">
  36. $(function() {
  37. // Use this example, or...
  38. $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
  39. // This, or...
  40. // $('#gallery a').lightBox(); // Select all links in object with gallery ID
  41. // This, or...
  42. //$('a.lightbox').lightBox(); // Select all links with lightbox class
  43. // This, or...
  44. // $('a').lightBox(); // Select all links in the page
  45. // ... The possibility are many. Use your creative or choose one in the examples above
  46. });
patryczakowy
jquery.js i jquery.min.js to to samo tylko wersja min jest zapisana bez zbędnych spacji i tabulatorów żeby mniej miejsca zajmować jeśli oba skrypty korzystają z tej samej wersji jquery to po prostu dołączasz tylko jeden plik jeśli są różne wersje to dołączasz tą wyższą.
szlipek
tak też próbowałem ale nic nie wyszło. Znalazłem innego lightboxa i już wszystko działa
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.