![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 311 Pomógł: 25 Dołączył: 29.08.2011 Ostrzeżenie: (0%) ![]() ![]() |
Witam mam pytanie posiadam taki kod js:
$('#theme').click(theme); function theme() { $('body').attr('class', 'bg-theme bg-theme'); } i chciałbym dodać zmienną do funkcji theme np: $('#theme').click(theme('something')); function theme(varible) { $('body').attr('class', 'bg-theme bg-theme'); } ale niestety funkcja nie wykonuje się, co muszę zmienić żeby można było dodać zmienną ? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 806 Pomógł: 1828 Dołączył: 11.03.2014 Ostrzeżenie: (0%) ![]() ![]() |
Najprościej:
albo: https://stackoverflow.com/a/9467172 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 00:11 |