Questions tagged as 'jquery'

4
answers

Change color of HTML elements when holding down the mouse

I am trying to change the color of the elements, changing their class, while the mouse is held down, giving the effect of "painting". Doing it by mouse clicks I have it, here I leave the code: $(() => { $('table').on("click", "td...
asked by 28.02.2018 / 17:29
2
answers

Copy the contents of an element to the clipboard using JavaScript

How can I copy the contents of a div (or any element) to the clipboard using JavaScript / jQuery only without using Flash? For example, if I have this code: <p id="mi_parrafo"> Texto que quiero copiar </p> <...
asked by 07.12.2015 / 17:25
9
answers

CSS for alert () or confirm () JavaScript

I would like you to help me to give css to the alert() and the confirm() of javascript, so that my messages are something elegant, I do not want to opt for a modal only for confirmations, so if someone knew how to I realize I would...
asked by 14.08.2017 / 04:53
4
answers

Count how many elements with the same class are with JQuery

I would like to know how I can count the elements that exist with the same class in an HTML to be able to be with JQuery but with JavaScript also OK. Thank you! Example div class="hola" div class="hola" div class="hola"    A s...
asked by 17.04.2018 / 15:54
4
answers

hide / show n elements "tr" from another element tr in a table

Currently I can only show / hide a single element like this: $(document).ready(function () { $("#Mostrar_Tabla").click(function () { if ($("#Tabla_Mostrar").is(":visible")) { document.getElementById...
asked by 20.02.2017 / 20:15
3
answers

Differentiate types of HTML elements in JavaScript or jQuery

I have a series of labels in my view JSP . Each label shows a unit of measure and if you want to edit it, it is replaced via javascript with a input via button. NOTE: both the labels and the input are elements wit...
asked by 03.12.2015 / 12:32
4
answers

Reuse ajax

I'm trying to reuse ajax to make it more mobile in my project. Put it in the following way waiting for an answer but no. function _ajax(params,uri,type){ $.ajax({ url: uri, type: type, dataType: 'json',...
asked by 30.05.2018 / 21:23
3
answers

How to join two html pages without using iframe

The idea is that if I have two HTML pages I can join them, and I can call their methods and the DOM between both pages, without using a controller like PHP Example: pagina1.html <!DOCTYPE html> <html> <head>...
asked by 27.04.2017 / 14:55
2
answers

Validate DatePicker Jquery

I am validating my form with formvalidation , the date is only Valid if I write it, if I choose it from the calendar, it is not valid. If you can help me validate it, I would appreciate your help. I use the datepicker from Jquery. Form fie...
asked by 06.06.2016 / 22:05
5
answers

Cancel an action

I'm designing an html table with Jquery which only edits the records or just cancels when editing, which starts my problem here. Simply wish is that by pressing the cancel button return the data to as they were before, for example: In my tabl...
asked by 03.04.2018 / 00:33