Questions tagged as 'javascript'

2
answers

How to give fadeIn () at different times in an img and id

I'm trying to make the text appear with a time and the image appears with a slightly longer time difference, to give a more interesting effect. The html code and js I will provide. The problem is that where the images are in the same block as th...
asked by 06.08.2014 / 14:43
1
answer

How to create a module in npm?

The idea is to be able to download this module by npm install and be able to execute this package: npm install nome-do-modulo --save Once downloading could run on my project as follows: nomeDoModulo = require('nome-do-modulo')    ...
asked by 02.09.2016 / 18:32
2
answers

How to check the number of users who accepted an event on facebook using the Graph API

I'm developing a website where it should show the number of people who have confirmed their presence at an existing facebook event. According to the Graph API documentation, so I can check this data I should use the following code: function ge...
asked by 25.07.2014 / 07:49
2
answers

HTML and Javascript integration

I'm doing some initial testing with javascript, and I'm not succeeding when trying to change a parameter from my HTML code. The idea is that by clicking the "Message" button, the text will be updated to "New Text!" Here is the HTML and javascrip...
asked by 25.08.2016 / 18:24
4
answers

Equivalent to PHP sprintf in JavaScript

Instead of doing: var html = '<a href="' + data.href + '" title="' + data.title + '">' + data.desc + '</a>'; I'm doing: var html = '<a href="{href}" title="{title}">{desc}</a>'; html = html .replace( '{href...
asked by 15.10.2014 / 18:50
5
answers

Can I make a JavaScript call through PHP?

I'm in a doubt ... I have a PHP code, and when it gets to the "end of it" I would call a JavaScript! Ex: <? .... sucesso('$a','$b'); ?> <script language="javascript"> function sucesso(a,b){ ... } </script>     
asked by 10.09.2014 / 16:18
2
answers

Merge array replacing equal results

How to merge an array by replacing the equal numbers? Example: Home array1 = [1, 2, 3]; array2 = [2, 4, 5]; array3 would be [1, 2, 3, 4, 5]; instead of% with% How to merge an array by replacing the equal numbers...
asked by 03.09.2014 / 03:17
1
answer

What is the equivalent function of window.location.href of JavaScript in PHP? [duplicate]

I want to redirect the visitor to another page so I wanted the equivalent of window.location.href in PHP     
asked by 02.10.2015 / 16:15
1
answer

Calling a SetInterval variable

I have the variable X X = setInterval(function() { ... and after a while I gave a stop in this setInterval with the function clearInterval(X) How do I call this variable to continue the loop after it has been "deleted"?     
asked by 29.09.2015 / 18:05
3
answers

Show / Hide animated information by clicking element

I would like to make a simple animation that is executed in the click event assigned to an element. This is the site that I will use this animation. Suppose my element is a circle, for example. I want it to click bigger and show some inform...
asked by 24.02.2014 / 19:55