Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> jak zapisać krócej funkcję w jquery?
marcus755
post
Post #1





Grupa: Zarejestrowani
Postów: 158
Pomógł: 1
Dołączył: 6.12.2012

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


  1. $('#a').hover(function(e){
  2. e.preventDefault();
  3. $('#content-menu-dic ul li a#a').addClass('a1');
  4. $('#content-menu-dic ul li a#b').removeClass('a1');
  5. $('#content-menu-dic ul li a#c').removeClass('a1');
  6. });
  7. $('#b').hover(function(e){
  8. e.preventDefault();
  9. $('#content-menu-dic ul li a#a').removeClass('a1');
  10. $('#content-menu-dic ul li a#b').addClass('a1');
  11. $('#content-menu-dic ul li a#c').removeClass('a1');
  12. });
  13. $('#c').hover(function(e){
  14. e.preventDefault();
  15. $('#content-menu-dic ul li a#a').removeClass('a1');
  16. $('#content-menu-dic ul li a#b').removeClass('a1');
  17. $('#content-menu-dic ul li a#c').addClass('a1');
  18. });
Go to the top of the page
+Quote Post

Posty w temacie


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: 24.12.2025 - 12:07