Questions tagged as 'javascript'

1
answer

Object with list of objects inside JavaScript

I'm using angular to make a form that contains multiple checkboxes (using angular-material), this form sends the values to the controler, which are received as follows: Ineedtogetthisdata(allobjectscontainthesamefields)andturnitintoaJSON.Doesan...
asked by 29.09.2016 / 22:00
1
answer

How to paint multiple page elements by clicking and dragging the mouse?

Essentially my program creates a "screen" of "pixels" where the divs are the pixels. It randomly generates the colors in the image and the user can use a palette that is underneath to change, as if it were to paint. However, I have a dilem...
asked by 26.10.2018 / 21:03
1
answer

How to manipulate the position of a div

I need to manipulate the position of two <div> in opposite motions. I searched in many places but found no explanation as to how such an effect can be done or how to do it. I did not want to ask for the answer, but I do not ev...
asked by 19.12.2014 / 16:53
1
answer

How do you get the mouse position relative to the page?

I have a menu that opens when I right-click on the table. The problem is that I could not get the mouse position when the page has scroll. I noticed you're getting Y X based on my monitor, and I need to get it based on the size of the page...
asked by 15.04.2016 / 21:09
1
answer

Create a jQuery instance from an array

I have the following array: var elementos = [$("#elemento1"), $("#elemento2"), $("#elemento3")] I need to create a function that "converts" this array into a jQuery instance, so I can use jQuery functions at all at the same time....
asked by 26.06.2016 / 21:20
1
answer

How to animate sprite sheets?

I'd like some help with JavaScript. Could anyone provide me with a basic animation code for a single sprite sheet ... If possible the HTML code as well.     
asked by 03.07.2016 / 18:27
1
answer

Why does TypeScript when compiled, convert "let" to "var" in variables?

If let variavel = "valor"; is also supported in JavaScript , because in TypeScript compilation, it transforms to var variavel = "valor" ? Take the test right here : function foo(){ var x = 1; let y = 3; if (true){...
asked by 20.08.2018 / 22:14
1
answer

What is the utility / reason for the existence of new Object ();

While studying a little more about objects, I came across things like new String , new Number , etc. I was curious, and I went to learn. I understood the operation, although I have my doubts about the usefulness of them, since my...
asked by 13.09.2018 / 20:09
1
answer

Communication between pages via JavaScript

I'm developing a web app, where each page has an option to filter, for example, one for brands, then the models of those brands, after, the cars and then the years of the car chosen. I would like to know a way to communicate these pages by pas...
asked by 02.09.2015 / 13:58
4
answers

Performing an unnamed dual role in the act of declaring it

I'm joking with Javascript and I came across a question. I understand that when my HTML page loads, if I already want to execute a function without having to declare it, I just have to define this direct function, like this: (function(){consol...
asked by 28.08.2015 / 04:52