Questions tagged as 'javascript'

3
answers

How to verify undefined correctly in Javascript

What is the best way to check if an element / variable is undefined in Javascript? I have already seen some examples using variavel === undefined and others using typeof variavel == "undefined" .     
asked by 04.08.2015 / 23:26
2
answers

How can I check if a string contains another in Javascript?

I would like to check if a string contains another, as if it were a String.contains() method but apparently there is no method that does this. Does anyone know of a similar method that does the same thing?     
asked by 30.01.2014 / 11:35
3
answers

Back to Top

I need to have a fixed icon on the page in the lower right corner of the screen. By clicking this icon it returns to the top of the page, making Scroll scroll to the top of the page. Can anyone help me? I'm a beginner and I have a hard...
asked by 28.08.2014 / 20:20
3
answers

Difference between '$ ()' and 'jQuery ()'

It is common to see, in codes that use jQuery, references to selectors using $() . But I've already found codes using jQuery() to make selection queries . What's the difference between them? Can I use either one or have specific...
asked by 10.04.2017 / 14:51
3
answers

How to calculate the difference between the server time and the user's computer?

I need to adapt my code to calculate the difference between the time of the server where the site is hosted and the time of the user's computer to not overload my system. I am setting up a table where I will show the time of another server an...
asked by 09.11.2017 / 21:30
5
answers

How do I mark and unmark a row in a table by clicking on it?

When you click on a line in a table, how to mark it by changing the background color of the line, and if you click again uncheck the background, and if you click on another line, deselect the old one and mark the new one. How to do this using...
asked by 19.02.2014 / 20:52
1
answer

Can you use two types of payment methods in a paid-for transaction?

For example, I want to sell a product that includes membership and monthly payment, R $ X, XX + R $ X, XX automatic debit. Example of automatic debit: $preapproval_data = array( "payer_email" => "[email protected]", "back...
asked by 29.09.2015 / 20:47
2
answers

Selectize.js with Tags, reload key and value in edit form

   I asked the same question in SO Gringo too . I'm doing a search form ( action=GET ) where a field uses Selectize.js: $("#selectize").each(function () { $(this).selectize({ plugins: ['remove_button'],...
asked by 07.12.2015 / 18:46
3
answers

How do I set a max-width to a div that increases and decreases proportionally?

My% w / w that increases or decreases proportionally is in the style of: padding-bottom: 75%; Look at this example: JSFiddle What I want is that the div that grows proportionally will lock the size when it hits the footer. If...
asked by 06.02.2014 / 15:09
2
answers

View player in the Android notifications area

I created an application that transmits a Streaming of the radio, but if I "minimize" the application it continues to play. So I'd like to know how I can get you to open a box on Android's notifications list, like the Play Music Ijust...
asked by 18.09.2015 / 23:40