Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [jQuery] Automatyczna zmiana zdjęć w sliderze
d.stp
post
Post #1





Grupa: Zarejestrowani
Postów: 358
Pomógł: 0
Dołączył: 19.04.2012

Ostrzeżenie: (0%)
-----


Mam prosty slider:
http://pai.org.pl/strony/advisable/
[JAVASCRIPT] pobierz, plaintext
  1. $(document).ready(function() {
  2. $('.buttons li a').click(function(){
  3. switch_tabs($(this));
  4. });
  5. switch_tabs($('.defaulttab'));
  6. });
  7.  
  8. function switch_tabs(obj) {
  9. $('.slider_image_1').clearQueue().hide();
  10. var id = obj.attr("rel");
  11. $('#'+id).show("slow");
  12. }
  13.  
  14. $().ready(function(){
  15. $('ul.menu li').each(function(){
  16. $(this).hover(function(){
  17. $(this).children('ul').show(400);
  18. },function(){
  19. $(this).children('ul').hide();
  20. });
  21. });
  22. });
[JAVASCRIPT] pobierz, plaintext

I jak zrobić, żeby zdjęcia automatycznie się zmieniały? Teraz działa to po kliknięciu w button:
  1. <ul class="buttons">
  2. <li><a href="#" title="" rel="tabs1" class="defaulttab">1</a></li>
  3. <li><a href="#" title="" rel="tabs2">2</a></li>
  4. <li><a href="#" title="" rel="tabs3">3</a></li>
  5. <li class="last"><a href="#" title="" rel="tabs4">4</a></li>
  6. </ul>


Ten post edytował d.stp 7.09.2012, 10:17:01
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 22:57