Questions tagged as 'javascript'

3
answers

How to make these radio buttons to the checkbox style, and change the value of a text depending on the choice? [duplicate]

Ineedtoputonmysitejustasitisinthisimage.IalreadydidinHTMLandCSSthesquarewiththeprice.HomeIdonotknowmuchaboutJSandIcannotdothesquaresontheleft.HomeByclickingon"No Visit / With Visit" it must change the value of the price. The buttons should be...
asked by 02.05.2018 / 17:45
1
answer

Problem with Mascara Currency and calculation

I have a function that is called here: $("#valorPrimeiroPedido").focusout(function () { var valor = $("#valorPrimeiroPedido").val(); calcularValorMercadoria(valor); }); $("#valorPrimeiroPedido").val() alrea...
asked by 05.04.2018 / 16:30
1
answer

How to look for the same occurrence of a term independent of its position in a string?

I need to create a regular expression that finds the value src=path-da-imagem in whatever position it is. Example: With the expression <img\s(src=\S*)\s(.*?)\/> I can find the result in: <img src="../../../assets/i...
asked by 11.04.2018 / 00:08
2
answers

Tooltip when disabled?

I want to make a tooltip appear when the button is off link saying that you need to mark the terms box, once you mark it the tooltip disappears. Can someone help me ? Thank you <!--Loja | INICIO--> <section class="container"...
asked by 04.02.2018 / 04:03
2
answers

How to save an object (JSON) per copy in Javascript

How to store the current state of a json object per copy? Because if I save by reference I lose the exact information of the object at that moment of the assignment. Example object: var sessao = {"num":"1"}; var vetorSessoes = []; function s...
asked by 17.02.2018 / 02:05
2
answers

How to replace part, of specific order, of a string?

I would like to know how to replace part of a string, but only part of order N. For example, replace the second (so only) "and" with "electricity."    Entry: Electricity       Output: Electricity Maybe it's simple, but I'm a layman on...
asked by 09.06.2018 / 06:12
1
answer

Validating form field

I am creating a simple form, in which I have to do a calculation of two fields to appear a message, until then no problem, but since there are several fields that I will have to apply the same formula several times, I wanted to do it in a way dy...
asked by 08.06.2018 / 19:01
1
answer

How should I work on Bootstrap and JavaScript links?

What is the best way to work with Bootstrap or JavaScript? Referencing by CDN link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" Referencing for the downloaded file link rel="styleshee...
asked by 01.06.2018 / 16:40
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
2
answers

How to make a loading gif in JavaScript?

I have a very stupid problem with my HTML project, where I wanted to show a gif of a page being uploaded, but it stays a lot longer than I can tell and with that, my real page does not come to be seen. Could someone help me with this? HTML:...
asked by 05.06.2018 / 21:41