Questions tagged as 'append'

1
answer

jQuery doubt append appendTo inject HTML

Hello, I have a question. I have a variable containing an html structure and I need to inject a basic div (< div < / div >) around the contents of this variable, as a parent, using jQuery only. I think I should use append and ap...
asked by 18.05.2017 / 14:34
2
answers

Length of jQuery does not update with append, how to solve?

I'm working on a script that causes me to load more records from the database when the user reaches the end of page scrolling. PHP / SQL is right, the problem is that jQuery does not correctly report the number of occurrences of class...
asked by 23.11.2017 / 11:49
1
answer

Is it possible to create a map to position elements?

I would like to know if it is possible to "pre-define" the position of an element when using append , for example: <div id="mainDiv"> <div class="child" data-position="2"></div> <div class="child" data-position...
asked by 17.07.2018 / 18:05
1
answer

appendHTML counter - how to do?

I have a label in the form of my site that adds to a div (in the example case, id of this div is grupoExt ) an HTML content. Here is the code: var numeroFE = 2; $("#addFE").click(function(){ var html3 = "&l...
asked by 20.03.2017 / 18:46
1
answer

Txt file manipulation in JAVA

Hello, I'm a beginner in java and I need to create a program that creates a txt file with a pre defined content, read it and divide the contents of this file into two different txt files. start with // (java comments) and pass the rest (it will...
asked by 20.04.2018 / 21:59
1
answer

How to mount an array of select items from select in html and run it to organize items in javascript?

I have the code: var associar = $("#associar"); var desassociar = $("#desassociar"); var permissoes = $("#permissoes"); var minhasPermissoes = $("#minhasPermissoes"); associar.click(function() { var selecionado = permissoes.find...
asked by 24.02.2016 / 18:12
2
answers

When using jQuery append it displays the text [object Object] and does not insert the element

I created a div.box in the html and in it I want to insert another div that I create in the code execution, follow the abbreviation: HTML: <div class="box"></div> JS: var item = $('<div />', {class: 'item'}) var box =...
asked by 20.02.2017 / 14:50
1
answer

How to insert dynamic rows into HTML table, and already set a class beforehand

I have an HTML table and I'm creating your lines dynamically using appendChild() , I'm just not able to set className dynamically on those lines, in the third column - "VALUE". See like this: var doc = document;...
asked by 03.06.2018 / 14:11
1
answer

Capturing value $ .getJson is coming undefined

I'm trying to mount a table from a JSON I get from a php page, however when I do the append the captured value appears such as undefined . $.getJSON("getEventoCategoria.php", {ID_EVT_Evento: ID},function (data) {...
asked by 07.10.2015 / 16:22
2
answers

Function append vs javascript [duplicate]

I have a page that generates a form dynamically using append('texto html'); These inputs that I generate after loading the page completely, I can not by them invoke functions js created in the ready of the page, that is, before the i...
asked by 24.08.2017 / 16:21