Questions tagged as 'dom'

2
answers

Disable horizontal scroll; but allow the vertical

I'm trying to disable horizontal scroll on a website; but without affecting the vertical. I have a script that works like a slider by sliding the "body" of the page to the left and revealing more content. However, this creates an extra empty...
asked by 05.12.2015 / 08:44
2
answers

Create elements of the DOM with jQuery

I need to create elements in a way that is not very confusing and easy to maintain to make a change. Currently I do it with this code with .append() and .html() : $('.Selector').append( '<div class="dropdown">'+ '&l...
asked by 23.12.2016 / 17:35
3
answers

Add rows to Table with JavaScript, DOM

I have a question, I currently have an HTML table, but I would like to add rows dynamically, I'm trying to do it in the DOM way, but I can not get it, my table looks like this: <table border="1" id="tablaprueba"> <thea...
asked by 29.08.2018 / 04:28
2
answers

Background photo that moves with hover mouse

I want to make an effect like the one in this Wordpress theme: link In the section where there is as a gallery of images and says things like "on the mountains", "take a flight", "a night to remember", etc. when you hover with the mouse...
asked by 06.11.2016 / 18:13
1
answer

Rotate an image by clicking - DOM - Javascript

I have the following CSS where I have the classes to add the rotation effect on an element: .animal{ width:200px; height:200px; margin:25px; float:left; background-size: contain; } .rota{ transform: rotate(360deg);...
asked by 31.05.2017 / 16:18
1
answer

Correct way to declare events in elements generated by DOM

I'm trying to see what would be the best option when dealing with events created by DOM that are not created when loading the JS. Let's say that I have an AJAX request in which your return created elements with DOM. setTimeout(Crear_d...
asked by 18.12.2018 / 00:16
1
answer

How do I open a page created with javascript?

I was writing a plugin for firefox in which I generate an html with the page in which the plugin acts and I want to show my html generated in another new page, what I have tried has a form quite similar to the following: function crearHTML(){...
asked by 22.06.2018 / 22:28
1
answer

Help Json Objects browse and display DOM JavaScript

I need help, I do not know how to get this out  If you click on a region you should appear next to the capital in red and below in different sub-lines all the populations ordered alphabetically (which you will ALWAYS get from the JSON) • Coma...
asked by 03.03.2018 / 16:04
1
answer

Delete a node / div - DOM - Javascript

I put you in situation. I have a form with id="miformulario" in which there are 2 buttons ( btnEnviar , to send the form and show in a box / div certain elements of the form, and btnEliminar , to eliminate the box /...
asked by 20.05.2017 / 13:41
1
answer

add element within another XML element DOM

this is my code: public class agregar extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { String nombre= request.getParameter(...
asked by 26.11.2016 / 22:35