Questions tagged as 'clone'

1
answer

How to clone a javascript object? By copy and not by reference? [duplicate]

I need to copy a javascript object to be able to manipulate the copy freely. But when I try to copy the object normally through the = sign, the "copy" is done by reference. That is, I actually want the object to be "cloned." See JsF...
asked by 19.09.2014 / 22:02
2
answers

How to clone an object in javascript? [duplicate]

I'm trying to pass one object per parameter of a function, but I do not want that object to change. For this I want to pass a clone parameter. Because in javascript, by the tests I did, the object is always passed by reference. Example:...
asked by 26.11.2015 / 18:00
1
answer

How to create a copy of an element, through its property

I want to clone only the images whose attribute alt is "photo". Code var str = document.getElementById('A'); var clone = str.cloneNode(true); document.getElementById('B').appendChild(clone); <span id='A'> <p&...
asked by 25.03.2017 / 17:50
1
answer

Problems with .clone () for radio buttons

I'm making a "add" button that with each click adds a div com Radio buttons below the div itself. I'm having trouble clicking on the radios that when I click on some line added and click on another line it deletes the value clicked before...
asked by 15.12.2015 / 13:46
1
answer

Cloned Connections

I would like to know if there is a way to create just one connection to the database to perform the tasks. With each Action executed, a connection is created with the Database and at the end of the Action execution, the connection is closed. So,...
asked by 12.01.2015 / 17:19
1
answer

How to clone a dynamically created element with jquery?

I need help cloning an element already dynamically created with Jquery and add +1 in the element's 'value' and 'name'. else if(valorSelect == 'listaSuspensa'){ $(this).parents(".questionario").find('.divResposta').html( '<div class="divList...
asked by 19.06.2017 / 19:30
0
answers

Select2 does not work after cloning the entire section

After cloning an entire section, select with select2 no longer works. I already tried to use the destroy to later use select2 in JS but it does not work. Can someone help me? It would be of great value. Thank you. The element I've cloned is...
asked by 10.11.2017 / 14:47
1
answer

Cloning a class

I'm "trying" by cloning the following class: public class CadHorario implements Serializable, Cloneable { private int cdHorario; ... private Date horarioInicio; private Date horarioFim; private DiasDaSemana diasDaSemana;...
asked by 27.11.2015 / 13:42
1
answer

How to clone a repository in Bitbucket using a bash code and pass the password as a parameter?

I have a bash code that creates an instance of a server in AWS. The last step of this process is to make the project clone that is in bitbucket.org . Normally what I do manually are these steps: cd $HOME/vhosts - I position...
asked by 14.01.2018 / 16:17
1
answer

How to recover the functions of a cloned editor?

I'mdynamicallyaddingthesummernotebelowingreen.I'mactuallycloningtheonesabove.OfcourseIwouldhaveaproblemwiththatotherwiseitwouldnotbeprogramming.Addedpublisherfunctionsdonotwork.CouldanyonetellmewhatIshoulddotogetaroundthisproblem?I'musingthecod...
asked by 03.08.2017 / 22:09