Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-25-2011, 06:48 AM   PM User | #1
ditchy
New to the CF scene

 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ditchy is an unknown quantity at this point
Question JQuery on array of inputs

Hi! I need help over my codes:
This code is to make a text field appear when the checkbox is selected
PHP Code:
$(document).ready(function(){
        $(
"#ben").click(function(){
            $(
"#benamount").toggle("fast");
            $(
this).toggleClass("active");
        
document.adminForm.ben.checked true;
        return 
false;
    });
    }); 
And this is the form part..

PHP Code:
<input type 'Checkbox' id="ben" value ="net"></input>
<
input style="display:none;" type='text' id="benamount"></input
But, I need to make the checkbox and the text field on loop. I need them on array. How will I do it? I need them to be dynamic, that's why I put them on array.
Please help. the script will only work on the first element but not on the succeeding elements. Thank you!!!!
ditchy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:14 PM.


Advertisement
Log in to turn off these ads.