Questions tagged as 'javascript'

1
answer

Why by "new Array" after the variable?

Why put new Array after the variable name? Example: var weatherPattern = new Array('Clouds', "raining", "clowdy");     
asked by 26.07.2017 / 18:06
2
answers

How to check if an element has a class, or has an "active" class

I used .toggleClass() in a div , which after clicking a button, activates the class " menu-active ", if clicked again, it removes it. So far so good. But now, in addition, I need something to check if this class is active,...
asked by 28.11.2016 / 08:01
3
answers

How to read a .json file in the module.config () of the Angular?

I have a config.json file in the root of my project with some information that can be changed: folder path, etc. I can not create constants (angular.constant) in the code, as I said the values of the file can be changed in production. But...
asked by 28.11.2016 / 12:32
3
answers

Limit of characters in a DIV

How can I limit the amount of characters that will be inserted into a div?     
asked by 21.10.2016 / 18:30
1
answer

Error in javascript / html code [closed]

I do not know where the error of my code comes from, I have already reviewed it and can not find the fault, it happens that the functions that were to be called are not being executed, <html> <head> <meta http-equiv =...
asked by 01.11.2016 / 00:37
1
answer

How to ensure that an element will have the DOM event?

Good afternoon, Today I'm facing a rather strange bug in my application: I have a field of type textarea where I type an email body and just under it a button that when clicked gets textarea content, opens a modal and inserts the same cont...
asked by 31.10.2016 / 19:56
2
answers

How to call the value of a javascript variable to use in src?

I have this function in js that takes the name of the video that the user chose function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) { va...
asked by 20.10.2016 / 03:12
1
answer

Javascript - Function Hide DIV does not work [closed]

Hello I have a div on my page which is set to (display: none) and clicking on the link hides or displays, but I do not understand why my function is not working. Code: function esconder(el) { var esconder = document.getElementById(el)....
asked by 01.10.2016 / 00:39
1
answer

Requested angularjs being executed first incorrectly

In a controller, I have two HTTP requests: function findProfessionalEmail(professional) { EmailHunter.findProfessionalEmail(professional.company_name, professional.first_name, professionalLastName).then(function (da...
asked by 20.09.2016 / 22:10
1
answer

Space at the end of a word

I created an application in react native and it does online searches via POST. It works fine, the point is that some gadgets include a space at the end of words, eg: The user types natação , but the cell phone sends natação_ with...
asked by 28.01.2018 / 14:18