Questions tagged as 'javascript'

1
answer

Why does Illegal invocation occur in JS?

I'm using GopherJS, and there are two ways to execute a function, via Call() or via Invoke() . Initially I was using code similar to this: js.Global.Get("navigator").Get("credentials").Get("store").Invoke( password.New(js.M{"i...
asked by 19.11.2018 / 19:18
2
answers

How to compare the CSS path of an element using JS?

I do not know if "path" is the best definition. But using QuerySelector you can get an element specifying a "path", such as: main section.sobre .view-more But how can I do the opposite? If I have an element, such as <button...
asked by 26.10.2018 / 16:31
1
answer

Implement button navigation: [first] [next] [previous] [last]

Explanation: I have a table in HTML + jQuery and I have an enumerated paging that is functional, but I would like to add an additional navigation to it. Question: I would like to add an implementation, of which it would be a 4-button na...
asked by 11.11.2014 / 14:12
1
answer

Function with if and substring is not working

I am trying to create a function that when executed checks whether the substring of the value of a <input> is equal to link or link , but it is not working. Is there something wrong with the code? function goToWeb...
asked by 14.06.2014 / 23:22
1
answer

How do I get someone to copy something from my site, go to the "source: myite.com" clipboard?

I'd like to make it that when someone copies something from my site, it's automatically added to the content copied from the source, for example:    source: myite.com     
asked by 07.06.2014 / 20:30
1
answer

Error rendering with jQuery Ajax

Quick information on how this code should work: Ajax takes an html, compiles with Handlebars, the same ajax takes a json from an api, packages everything and renders an index with an append. var orderTemplate takes a template from index.hb...
asked by 19.05.2018 / 05:33
1
answer

Focusing on an element

In CSS it would look something like this: div { display: none; } div:active { display: block; } And some user action would focus on this div by javascript I know what I can do by adding and removing a class / attribute however I...
asked by 28.05.2018 / 00:36
2
answers

Two jquery masks in one field

Can anyone help me? I have an input in which it is CPF / CNPJ, how do I make a mask containing two different values for the same field? And how would the code contain an additional telephone field? In other words, masks on the input cpf / cnp...
asked by 16.04.2018 / 00:42
1
answer

Dropdown HTML and CSS

* { margin: 0; paddin: 0; } body { margin: 0; paddin: 0; font-family: 'Source Sans Pro', sans-serif; background-color: #F7F7F7; } .header { position: absolute; width: 100%; z-index: 3; h...
asked by 17.04.2018 / 05:54
1
answer

Dynamic check box with unwanted behavior

I have these checkboxes, the idea is to be dynamic, to appear only the bodies that refer to the entities, but there is a detail that I would like to correct: before selecting something in "Entity" all options are available in the "Organ" , bu...
asked by 10.04.2018 / 19:42