Questions tagged as 'javascript'

2
answers

Return div to start position after animation?

How can I do to return my div to the starting position if it reaches a certain point on the left? I have the following current code: $(document).ready(function() { $("#botao").click(function() { $(".maior").animate(...
asked by 17.06.2014 / 19:18
1
answer

Checking the background-image of an element

I would like to know how to check if any element has a certain background with pure Javascript (without jQuery). With jQuery I can use this: if( $('.icon').css('background-image') === 'url(http://i56.servimg.com/u/f56/12/05/75/97/e410.png)'...
asked by 14.06.2014 / 17:00
2
answers

How to add div before another div with JavaScript

I'm having trouble getting a new div before another or just adding a div, but with JavaScript. Example: I already have a DIV <div class="primeira"></div> I want to add one above it with Javascript, thus: <div class="d...
asked by 28.09.2017 / 16:38
2
answers

Pass object list between files

How to pass a list of objects through two JavaScript files? I have a list: var elementsList = []; And this list is populated with N objects: var oElement = { elem: "", emin: 0.0000, emax: 0.0000 } I need to pass this all...
asked by 24.04.2014 / 19:52
1
answer

How to make a horizontal list of images that will not break?

I want to make a list of images horizontally, but they are falling, look: My CSS: #fotos{ margin-top:30px; width:650px; overflow-x: hidden; height:110px; border:1px solid #CCC; } #fotos ul li{ margin-right:4px;...
asked by 10.05.2014 / 02:01
2
answers

Text input text box on the right

In a box that the text is aligned to the right, how do I do that when I focus on the text box independent of the place the writing cursor goes right? I want that when I click on an input of type text where a decimal value is inserted the cour...
asked by 14.02.2014 / 13:20
1
answer

How to list available events in an element in IE8?

I'm doing a shim / polyfill to work with CustomEvents to IE8, but I'm having a problem detecting when the event is not standard. In IE8 each element may have a different list of available events, there is no possibility of executing a...
asked by 14.02.2014 / 03:44
1
answer

Generate random random string in NodeJS

Because, using the Javascript language on the NodeJS platform, generating a string, preferably with configurable size, random enough to be used in cryptographic routines can not be insufficiently random? If you propose more than one soluti...
asked by 15.02.2014 / 20:28
1
answer

Relate dynamic inputs with datalist to other dynamic inputs

I'm new here and curious in programming, so sorry to talk bullshit, but I need help. I have a form with the option to insert inputs dynamically. Whenever an "item" is added, two inputs are added, the "foo" and the "bar" . All "foo" relat...
asked by 23.04.2017 / 16:03
1
answer

Get Response from an API that returns error 500

Next, I have an API that returns error 500 every time it breaks the business rule and returns a status and message. We know it's not a good practice to return status 500 under these circumstances, but is there any way I can get the JSON that it...
asked by 22.05.2017 / 15:20