![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 50 Pomógł: 0 Dołączył: 12.03.2010 Ostrzeżenie: (0%) ![]() ![]() |
Mam kilka inputów (text), wszystkie klasy card_link i taki kod jQuery:
Kod $(document).ready(function() { var selectedInput = null; $('.card_link').click(function() { if($(this) !== selectedInput) { selectedInput = $(this); $(this).select(); } }) }); Problem jest taki, że jak kliknę ten sam input dwa razy to i tak warunek if($(this) !== selectedInput) jest spełniony. Sprawdziłem value tych obiektów i są identyczne (w końcu to te same inputy). Czy ktoś wie czemu referencje są różne? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 3.10.2025 - 11:39 |