![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 42 Pomógł: 0 Dołączył: 11.12.2013 Ostrzeżenie: (0%) ![]() ![]() |
chce z elementu Var toFocus pobrać ID i sprawdzić IF
if (toFocus.attr("id") == "krok1") { $("#step0").show(); } else { $("#step0").hide(); } |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 806 Pomógł: 1828 Dołączył: 11.03.2014 Ostrzeżenie: (0%) ![]() ![]() |
Co zawiera zmienna toFocus?
-------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 42 Pomógł: 0 Dołączył: 11.12.2013 Ostrzeżenie: (0%) ![]() ![]() |
var toFocus = $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []);
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 6 806 Pomógł: 1828 Dołączył: 11.03.2014 Ostrzeżenie: (0%) ![]() ![]() |
Jeśli więc toFocus nie będzie pustą tablicą, to powinieneś dostać id elementu.
Spróbuj przed ifem wstawić: alert(toFocus.attr("id")); -------------------- |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 42 Pomógł: 0 Dołączył: 11.12.2013 Ostrzeżenie: (0%) ![]() ![]() |
dzięki kolego już wiem co jest nie tak
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 05:39 |