Questions tagged as 'javascript'

1
answer

JavaScript CPF generator [closed]

I made a CPF generator in JavaScript, and was wondering if my code is good or what I can improve on it? Function that will be called by event onsubmit function gerarCpf() { var cpf = document.getElementById("cpf"); var num1 = alea...
asked by 08.10.2017 / 21:09
1
answer

Catching more than one element with JQuery / JavaScript

Good morning! Would you like me to get more than one element with JQuery? For example, I'm doing this in my code: if (!is992()) { $j('.filters .title--sm').click(function(){ $j('.filters__list').slideToggle(50); $...
asked by 13.10.2017 / 13:47
1
answer

Tree menu - Error when selecting element (ul: onclick)

I have a problem in the tree menu below. When I click on the child elements of ul-0 I perform the class exchange. How to avoid this? function ready (fn) { if (document.attachEvent ? document.readyState === "complete" : document.readySt...
asked by 04.04.2018 / 16:54
1
answer

Mask Accounting plan in javascript [closed]

How can I make a function in javascript to format the values entered in an input to the standard chart of accounts chart similar to the one below. 1 (min) 1.1 1.1.1 1.1.1.01 1.1.1.01.001 (max) Column Account     
asked by 09.03.2018 / 03:06
2
answers

Position div or button inside at a specific point in an image

I need to mount a kind of map, where the user clicks on a button that is in the x, y coordinate of an image and a modal opens. I can not use background-image for this, so I put the image with z-index: -1 , now I need to create some but...
asked by 09.05.2018 / 15:26
1
answer

How to change the contents of a DIV if you are using adblock

Hey guys, on my site has a button inside a div: <div class="novolinkdedownload"> <a href="#" class="btn btn-primary" id="butdedownlaodnovo">BAIXAR AGORA</a> </div> Is there any way for the user to use the famous adbl...
asked by 26.04.2018 / 11:01
1
answer

Use the same script for multiple forms

How do I use only one script for multiple forms? <script> $(document).ready(function() { $("#formPost").submit(function() { var dados = $(this).serialize(); $.ajax({ type: 'POST',...
asked by 23.05.2018 / 19:49
2
answers

How to create a property in an existing object of an http request?

I'm trying to exhaustively put a property on an object that comes from a request (JSON), but I'm not getting it, it's like it just does not get it, but when I do a console.log, there it is, but it's not returning in the reply I send to the postm...
asked by 16.05.2018 / 00:22
1
answer

How do I create desktop notifications in Chrome extensions?

How to create Desktop notifications to use in web-extensions (Firefox, Chrome and etc.) and also would like to know if there is any difference between Chrome, Opera and Firefox?    Note: This is a tutorial question, read more at:       C...
asked by 03.01.2018 / 21:26
1
answer

I can not get data-object value

The following problem has several inputs listed with the same css class, however I need to get a data-atributte of each one by clicking on its input to get its value from atributter: For example <input type="button" data-object="{"nome...
asked by 12.12.2017 / 12:08