Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jQuery question

Status
Not open for further replies.

FALCONSEYE

Programmer
Jul 30, 2004
1,158
US
I have the following:

Code:
$('[class^=toggle-item-link#j#]').hide();

#j# is a variable. There are 10 textareas that I only show 4 of them initially.

I have 10 checkboxes with a classes like: link 1,link 2,link 3.

On:

Code:
$('[class^=link]').click(function(event) {
...

$('[class^=toggle-item-link#j#]').val(')
var y = this.id.replace('addNew', "");

How do I append var y toggle-item-link so that toggle-item-link 5 value is set to '.

thanks in advance.



 
implemented this solution:


if ($('[class^=link]').is(':checked')) {
$('#remove'+y).val('TRUE');
} else {
$('#remove'+y).val('FALSE');
}

after the page submits, i check for remove[y] to see if anyone of them is set to 'true'.

thank

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top