Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
jquery checkbox

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
sIFR



Joined: 17 Aug 2007
Posts: 19

PostPosted: 15.07.2008 09:00    Post subject: jquery checkbox Add user to your forum ignore list Reply with quote

imam par checkboxova sa id-em

<form>
<input type="checkbox" id="box1" /> a
<input type="checkbox" id="box2" /> b

i sad bi trebao sa jquery kad je recimo cbox 1 selektiran da mi
sakrije recimo neki objekt

if ($('#box1:checked')) {
$(".aa").hide();

}

medjutim nisam uspio pronaci neki pravi primjer ...ovaj if ($
('#box1:checked')) ne radi ... koja je pravilna sintaksa za takvo
nesto ...

znaci ako je odabran cbox 2 da sakrije neki objekt b ako su oba
oznacena da sakrije i a i b ...

treba mi nesto kao ovdje http://planetozh.com/projects/lightbox-clones/
... ali cisto jednostavno sa 2,3 chekcboxa ...
Back to top
View user's profile Send private message
strija



Joined: 14 Sep 2003
Posts: 473
Location: Čakovec

PostPosted: 15.07.2008 09:32    Post subject: Add user to your forum ignore list Reply with quote

Pa stavis samo na svaki checkbox change() akciju, pitas if( $(this).attr("checked") ), i prema tome sakrivas ili prikazujes odredjene elemente sa show() i hide().
Ako nece ici mogu i na brzinu neki primjer napraviti Smile

_________________
We can exist in ambiguity, but it means the deepest loneliness. | creolab.hr | thefarewellreason.com
Back to top
View user's profile Send private message Visit poster's website
r3dsc0rpi0n



Joined: 20 Apr 2005
Posts: 354
Location: Zagreb

PostPosted: 15.07.2008 10:26    Post subject: Add user to your forum ignore list Reply with quote

na neki event (click ili whatever) provjeris jeli cekiran

Code:
if($(this).is(':checked'))

_________________
::: Fortis est, qui se vincit ! ::::
Back to top
View user's profile Send private message Send e-mail Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group