What i want is that making an div toggle. Visible it or not.
this is my div
<div id="kullanici_ara" style="display:none;">
<form action="kullanicilar.php" method="get">
<label>Aramak istediğiniz kullanıcının adını giriniz</label><br />
<input type="text" name="ara"/>
<input type="radio" name="type" value="nick" checked="checked">Pasaj Adı</input>
<input type="radio" name="type" value="id" />Id</input>
<input type="radio" name="type" value="name" />Ad-Soyad</input>
<input type="radio" name="type" value="email" />E-posta</input>
<input type="radio" name="type" value="city" />Şehir</input>
<br /><br />
<label>Kullanıcıları puanlarına göre büyükten->küçüğe sıralamak için seçiniz.</label><br />
<input type="checkbox" value="puan" name="puansort"><br /><br />
<input type="submit" value="Ara" />
</form><br /><br />
</div>
Is there a way to toggle div according to id ? I mean a have a code like that
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("div").toggle();
});
});
</script>
Is there a way to write above code a id ?
Your answer is:
See: Jsfiddle
Keep in mind that every button will now toggle the div with id
#kullanici_ara. Maybe you want to specify a certain button with an id. Something like:And:
See: ID-selector