Questions tagged as 'javascript'

3
answers

How to make a submit by sending completed data in the form to an email?

<div id="mainDiv"> <div id="marca"> <img class="imagens" src="media/img/titulo.png" alt="Titulo"> </div> <div id="anaMaria"> <img class="imagens" src="media/img/fundoCadastroDois.png"...
asked by 06.02.2014 / 02:21
2
answers

Display one item at a time with jQuery

I created a menu to see the possibilities with jQuery animations. I wanted the jQuery to display every% of%% at a time, when I clicked the button, not all at the same time. I wanted a different delay in each LI . How do I? The code I...
asked by 31.10.2018 / 01:39
2
answers

Select element based on data-id attribute

How do I get the id in JavaScript which, in HTML, is data-id="2" ? <ul> <li data-id="1" id="e1">Elemento 1</li> <li data-id="2" id="e2">Elemento 2</li> <li data-id="3" id="e3">Elemento 3&l...
asked by 03.07.2018 / 18:12
2
answers

How do I get the contents of a JavaScript variable, which is an HTML tag?

I have HTML tag content: <p id="horaInicial">2018-07-23 16:40:16</p> Inside a JavaScript variable, I want to know how to access the value: 2018-07-23 16:40:16 and put inside another variable! Can anyone help?     
asked by 26.07.2018 / 20:00
2
answers

How to remove repeated characters from a string?

This is my role: let longest = (s1, s2) => { var s1 = 'xyaabbbccccdefww'; var s2 = 'yestheyarehere'; let res2 = s1.concat(s2); console.log(res2); };     
asked by 23.08.2018 / 22:59
2
answers

How to access an object by a variable?

I have two select s that sends to event change the value of data-id and assignment to variable tipo . I have two objects each with values in the keys 1: and 2: . Using tipoUm[1] returns me the...
asked by 12.06.2018 / 23:05
3
answers

Is it possible to use Jquery to animate Background-color?

Recently I created a JavaScript Script to do a color-changing loop I used the add class and remove class, but when I went to practice in jQuery this did not work. This is my code: $(".alpha").animate({"background-color":"#09f"}, 3000); I...
asked by 13.06.2018 / 07:17
2
answers

Doubt with syntax

Simple doubts. Usually I see this syntax: require('../lib/dbconnect')(config); But I do not understand why I use these parentheses in this way. (....)(....); Can anyone explain what it's all about?     
asked by 15.10.2015 / 15:06
1
answer

What is the $ scope? $ apply?

I've seen in a code the $ scope. $ apply that uses AngularJS, what's it for? In the context you are in it is this way: var a = function(param){ $scope.$apply(function(){ var image = document.getElementById('img');...
asked by 05.11.2015 / 13:58
2
answers

Change style dynamically through JS

In a progressbar, for example, with this style: #progress { background: #000000; border-radius: 13px; height: 20px; width: 400px; padding: 3px; } #progress:after { content: ''; display: block; background: white; width: 300; height: 100%; bord...
asked by 13.10.2015 / 07:04