Questions tagged as 'javascript'

2
answers

How to share functions between javascript files?

I have two JavaScript files. file1.js function teste() { alert("fui chamado!"); } In file2.js I would like to have access to the teste() function of file1.js without having to reference within HTML . Home Is th...
asked by 02.06.2015 / 23:03
4
answers

Load page and scroll automatically to a certain element

In a contact page there is in order: a banner, map and form. How can I make the page automatically scroll down by letting the page start automatically from the map?     
asked by 27.08.2015 / 14:31
3
answers

Reset function alert

We use alert(text) to give an alert in the window, there is a way to redefine this function so instead of displaying this default window it displays a custom made in HTML but without losing its real function, it would just be an exchange...
asked by 30.05.2015 / 04:59
2
answers

setTimeout not executed in the loop (each)

See the function below: $(grupo).each(function (i) { setTimeout(function () { $.ajax({ url: "curltst.php", data: { acao: "teste", mensagem: mensagem, grupo: gr...
asked by 20.03.2015 / 01:06
2
answers

Difference of '' and ''

I'm reading ng-book 2 on Angular 2 and in one of the exercises a question arose. When setting up my first code component it does not display the title and link values in the console, but the second works perfectly. The first one...
asked by 05.03.2017 / 15:34
3
answers

Store CSS in string

.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input...
asked by 02.06.2017 / 17:51
3
answers

How to create div with javascript

Well, I have the following situation: <div class="corpo"> <div class="esquerda"></div> <div class="meio"></div> <div class="direita"></div> </div> I need to add a new div called "al...
asked by 03.03.2017 / 23:10
1
answer

appendHTML counter - how to do?

I have a label in the form of my site that adds to a div (in the example case, id of this div is grupoExt ) an HTML content. Here is the code: var numeroFE = 2; $("#addFE").click(function(){ var html3 = "&l...
asked by 20.03.2017 / 18:46
2
answers

How to reset all data in a form if the user returns to the page?

I have a form that, after being submitted, displays the result on a second page, type: <form method="post" id="form" action="form.php"> <input name='nome' id='nome'> <input type='submit' value='Enviar'> </form> And n...
asked by 04.03.2017 / 12:40
2
answers

Dynamic writing effect of text

I would like to use in a web project an effect that "writes" the text on the screen as if it were someone typing, Type if the sentence is "Hello world" it will show: Understand the "|" as the writing cursor: "O |" And after about 0.2...
asked by 10.04.2018 / 02:31