PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, September 6, 2022

[FIXED] How to make clone div enabled using jquery?

 September 06, 2022     javascript, jquery, web, web-deployment     No comments   

Issue

This is my form

I have been trying to enabled my coned div and disable parent div .

function AddGroup() {
var newgrouplist = $("#group-list-edit-1").clone();
number1 = number1 +1 ;
newgrouplist.attr("id", "group-list-edit-"+number1);
newgrouplist.find("#group_select_1").attr("id", "group_select_"+number1);
newgrouplist.find("#group_select_1").attr("class", "group_select_clone");
$('.group_select_clone1').attr("enabled", "true");  
newgrouplist.find("#del_div").attr("style","border: 1px solid;font-size: 16px;padding: 1px;");
newgrouplist.find("#del_div").attr("onclick","DelGroup('group-list-edit-"+number1+"');");
//append clone on the end

This is how i'm editing my clone. Is there anyone who can help me with my problem ?


Solution

You can use the .clone() method.



Answered By - Stephen.W
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing