I am learning javascript and downloaded the Olw Carousel and I went to see the js and at the beginning of the script there is this excerpt ;(function($, window, document, undefined) What intrigued me was this point and comma in the beginn...
Should not the code below be executed automatically by getting the values of the id's and assigning them to the array ui?
var ui = ["input", "prompt", "heading"];
ui.forEach(function(id){
ui[id] = document.getElementById(id);
});
I'd like to create a "cast" object (maybe a class, maybe a function), with possibly other objects inside it, and arrays . The structure I imagine is like this:
postagem: {
titulo: "",
autor: "",
texto: [
{
linh...
How to execute a function when the user hold a button and stop executing when the user releases the button.
As in WhatsApp when you are going to record an audio ...
I'm developing a time spent (browser game), where the user will guide your plane through the scenery!
I have 2 div , at first I create a rectangle where when moving the mouse I capture the axis X and Y , I need to move a character in...
With reference to these two questions:
Simple Comparison Between Dates
How to compare two dates in Javascript or jQuery
I need to compare the dates and I need to distinguish three dates between two dates, either being equal or...
I'm using the API to issue some sounds, the problem is that in Firefox I can not run mp3 , but how can I do to include other formatting in this code?
How can I do to add another ogg font for example?
I'm using API to call Audio like...
I'm trying to access a URL in AJAX but is giving the following error:
XMLHttpRequest can not load link . At the
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin ' link ' is therefore not...
I have a simple JavaScript code to add a string to a ul list:
JS:
function init() {
var botao = document.getElementById("addButton");
botao.onclick = handleButtonClick;
}
function handleButtonClick() {
var textInput = d...
How can I delay a function, since the checkboxes are generated dynamically in the conventional way in javascript, and only run after the entire page has been rendered and the other javascripts have been executed?
I'm trying to use this code:...