Questions tagged as 'javascript'

1
answer

jQuery ajax, asynchronous encapsulation

I like encapsulation because it greatly reduces the source code, I have done the following regarding ajax: custom.ajax=function(obj,funcao,view){ // FUNÇÃO AJAX var data = {'obj':obj,'func...
asked by 08.07.2015 / 20:53
4
answers

Set generic "data - *" attributes with javascript;

I need to retrieve all my data attributes, and set the information to a specific date attribute. Example: <div class="box_campo"> <input type="text" data-valor="0"> <ul> <li>apenas exemplo</li>...
asked by 13.07.2015 / 21:59
2
answers

JavaScript Date

I have a date in the following format: 1424102400000 , that is, an integer value. (I do not know how to say the name of this format). Home I need to convert it to presentable value to the user, so far so good. I'm using the toUTCString () met...
asked by 22.07.2015 / 14:09
1
answer

Reference not found for object property

I developed a simple particle code in codepen.io and in its execution it generates a log with the error: Uncaught TypeError: Cannot read property 'color' of undefined What is the reason for the error? // inicia o canvas var canvas...
asked by 16.01.2015 / 14:22
1
answer

Events of touch swipe, swipeRight and Left do not work on android 4.4.2

Touch events do not work on Android 4.4.2 Would anyone know how to fix this?     
asked by 16.01.2015 / 04:18
2
answers

How to use the date parameter of the $ .ajax

Is it possible to send two JSONs at the same time as the data parameter value of jQuery.ajax ()? Is there any way to call these two arguments, since I need to call these two json and display on the screen? Follow the code below: var to...
asked by 27.01.2015 / 00:29
2
answers

How to block all "radios" of a form when you click a button?

I made a quiz with some questions and answers, I would like someone to help me solve the following problem, I want that when clicking the button to see the result of quiz , all the answer options will be locked. The user will no lon...
asked by 20.02.2015 / 06:16
1
answer

How do I remove the parent element and all its contents when child element is clicked?

In this tag, how could I remove the <li> (parent) element whenever the <a> (child) element is clicked? Remembering I want to do this without jQuery. <ul> <li> <a href="#">example</a>...
asked by 10.02.2015 / 00:04
2
answers

How to display alert after error of an eval ()?

I have a calculator that works something like this: [bolas][+][preco da bola] I scan the string by replacing [XXXXXXX] with the corresponding value and use eval to perform the calculation. But there may be cases of error when for example th...
asked by 06.02.2015 / 20:09
3
answers

Function to format dates

I have a question regarding JavaScript. I want to create a function where it receives a date and then I can show it as I want. for example YYYY / MM / DD or DD / MM / YYYY or otherwise. I have the function that has a date: function data...
asked by 03.03.2016 / 19:01