Questions tagged as 'javascript'

2
answers

What are MIME types?

What are MIME types? And how important is it for rendering pages / files correctly? Is your use mandatory or depends on your browser? If not declared, can browsers behave differently at treatment time? Example: <script type='tex...
asked by 13.11.2015 / 13:25
8
answers

How do I read values from the URL in Javascript (QueryString)?

When I access a page, for example /item?tipo=1&nome=po%C3%A7%C3%A3o%20de%20cura How do I get these values from the URL by properly decoding?     
asked by 15.12.2013 / 19:22
1
answer

What is and how does the context in Javascript work?

Essential part of Javascript, every function in Javascript has context, how does it work, how does it manipulate it, and what changes in the strict mode ( 'use strict' )?     
asked by 11.03.2014 / 23:53
5
answers

How to swap the img src of a small image for a large image?

Information: I'm trying to make a simple photo gallery. I want to show the image clicked in large size in the center of the screen. (Clicar em 0.jpg e mostrar em uma outra div 0Large.jpg) Problem: With the code I have I can do t...
asked by 14.02.2014 / 01:09
1
answer

What is the purpose of the with_jquery function?

I'm learning to write UserScripts (for TamperMonkey ) and pretty much all the examples I see make use of a with_jquery function: function with_jquery(f) { if (!jQuery) return; var script = document.createElement("script");...
asked by 06.10.2016 / 17:32
5
answers

Use JS to relieve PHP

Well, I have a PHP file that generates a document (I get through AJAX). This document goes through some functions (that I did in PHP), for example, convert a string to code, add fields .. Well, for organization purposes, I did everything with...
asked by 09.05.2015 / 20:18
4
answers

What is the difference between the find and filter of jQuery?

I remembered that there is a function in jQuery called filter . I already know find , but I want to know if there is any difference between them or if they are the same thing.     
asked by 05.02.2014 / 00:53
5
answers

How to test null values in JavaScript

I found the following code, and I got the impression that it did not make much sense. function (data) { if (data != null && data !== undefined) { // codigo } } From here, three different scenarios can happen: Th...
asked by 25.02.2014 / 22:34
1
answer

Object.create or new Object () in JavaScript? What's the difference between the two?

I'm going through a technical question in JavaScript: What is the difference between Object.create and new Object() ? Which cases do I have to adopt one instead of the other?     
asked by 28.08.2014 / 21:36
2
answers

Is it possible to use masks on mobile devices satisfactorily?

Then after a true pilgrimage that yielded some 10 questions, I discovered that the masks I was using do not work correctly on mobile devices. The main ones are (were?): MaskMoney inputMask What happens is that on the mobile de...
asked by 09.10.2015 / 21:48