I have a div
<div id="s1">s1</div>
Can JQuery check the ID and create a copy of the div BUT with the 1 being changed to the next number?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The objective of this code is to create an ever advancing s index that uses a global
sIndexvariable that increments as each div is cloned. This allows for continual progressing numbers.If you don’t want the contents of the previous div when copying, try
clone(false)instead.