Questions tagged as 'dom'

3
answers

createElement () method in PHP

In javascript, I can do: var span = document.createElement('span'); span.innerHTML = 'foo'; span.className = 'bar'; Is there something similar so that I can create a ElementNode in PHP, at least with the basic attributes (name, class...
asked by 23.01.2014 / 00:23
2
answers

JQuery click event in .class selector

I created several div using jQuery where I assign them to the CSS class numero : for(...) textoHTML += "<div class='numero par'>"+sorteado+"</div> <!-- numero par-->\n"; ... textoHTML += "<div class='numero im...
asked by 28.02.2014 / 05:08
5
answers

Changing text in several different places on the HTML page

I'm thinking of developing a i18n system for an application. My idea is : there is a text # i18n_label_name somewhere on the page and # i18n_label_contact elsewhere. > Question : What is the most performative way to scan the whole p...
asked by 12.11.2015 / 12:51
3
answers

How to traverse a children and a div with JavaScript?

I need a function that traverses #paicasas and leaves the background of all children "casa1, casa2 ...". I tried to do this but I know it's far from right. function apagar(){ for(var i in document.getElementById('paicasa...
asked by 10.11.2014 / 21:12
1
answer

Access through JavaScript / Jquery an element that came from AJAX after the DOM LOAD

I am developing a WEB APP with AngularJS, there is an element that is coming to the DOM after its loading, I am trying to write an event: $('elemento').click() But when you finish rendering the page the element does not yet exist because it...
asked by 16.04.2015 / 00:33
3
answers

How to insert an element between two elements?

Explanation: I have a <div> parent that contains two <div> daughters, however I would like to insert a <table> using javascript, between, that is, in the middle of these two <div> daughters...
asked by 19.02.2014 / 20:49
2
answers

How to change the text of the OK button for Alert?

Personal I need an Alert with the "Confirm" button instead of the "OK" button. How do I do this?     
asked by 27.03.2014 / 13:05
4
answers

Two-dimensional Array

I'd like to loop through a two-dimensional array according to the code: var cadeiras = [[true, false, true, true, true, false, false, true, true, true, false, false], [true, false, true, true, true, false, false, true, true, tr...
asked by 20.10.2015 / 19:30
3
answers

How to collapse the height of an element with jQuery

Oops, I'm not able to collapse the height of an object in the document. I have a slider, which works with ul > li (maybe it's relevant), and inside a <li> slide, I'm putting via javascript and c # three divs, each with...
asked by 11.06.2014 / 21:40
1
answer

Help with PHP Replication Structure - PARSER - simple_html_dom.php

I am making a parser with simple_html_dom.php where I pull all the links of a certain page. I can pull the links and assign to an array, then the problem comes up: This page has a maximum display limit of 36 items per page. items i...
asked by 19.05.2015 / 15:39