Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Jquery]Usuwanie elementów.
cykcykacz
post 3.06.2013, 13:28:51
Post #1





Grupa: Zarejestrowani
Postów: 550
Pomógł: 9
Dołączył: 29.05.2009
Skąd: Ostrów Wielkopolski

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


Witam, mam taki html:
  1. <label class="text" for="Nazwa_Firmy">Nazwa Firmy</label>
  2.  
  3. <div class="div_text">
  4. <input type="text" id="username" class="username" value="" name="log">
  5. </div>
  6. <div class="div_text">
  7. <input type="text" id="surname" class="surname" value="" name="log">
  8. </div>
  9. <div class="div_text">
  10. <input type="text" id="city" class="city" value="" name="log">
  11. </div>


I jak przy pomocy Jquery shować/usunąć div z klasą div_text i inputa z odpowiednim id?

Ja próbowalem w ten sposób:
[script]
$("fieldset .div_text #username").hide();
[/script]

Ale ten kod usuwa mi tylko inputa:
  1. <input type="text" id="city" class="city" value="" name="log">


A ja chcę aby usuwało mi z divem powyżej czyli usuneło:
  1. <div class="div_text">
  2. <input type="text" id="username" class="username" value="" name="log">
  3. </div>
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 17:44