Questions tagged as 'javascript'

2
answers

jQuery function with fancybox - I'm having refresh problem

When you open or close fancybox (I am a programmer php but starting at Javascript with jquery ), in> refresh and back to the top of the content losing the focus of the place that the content was when it triggered fancybox . Th...
asked by 17.02.2014 / 12:23
3
answers

Button next to text bar with Bootstrap

I'm trying to create a very simple form with Bootstrap consisting of just a text bar and a browse button. But even though they are both in .form-group , text bar has a width of 100% and the button is down, instead of appearing to...
asked by 11.03.2014 / 13:58
2
answers

Get CSS by JavaScript

Is there any way to get the list of all CSS applied to an element by JavaScript ? Example: Let's say I have the following HTML element: <div id="mega">Content</div> I also have CSS : #mega { width: 300px; heigh...
asked by 03.11.2017 / 13:05
2
answers

How to pass an array as a parameter to function?

How do I pass an array as a parameter to a function? This way I did not work. var arr = [7,4,2,12,10,9,17,20]; function soma(num1,num2) { resul = num1 + num2; return resul; } document.write(soma(arr[]));     
asked by 28.08.2017 / 21:02
2
answers

Convert utf-8 codes to unicode

Well, I have a JSON where all unicode symbols like this "★" are in this format: "\ u2605" have some way to convert those codes to the symbols when my program NodeJS read the JSON ? Example of how it is: {"name":"\u2605 Bayonet","pri...
asked by 24.08.2017 / 16:47
1
answer

Fill date and time in View mvc 5 razor

I have a registration form where I have a record date field that I currently fill in my save method, except that my server is hosted in another country where the field is being filled from the location of the hosting, quite different from where...
asked by 12.12.2018 / 19:27
1
answer

Issues with Orientation in Datepicker

I'm having trouble making the datepicker 'open' down. Follow the parameters of the datepicker I'm using. $('.date').datepicker({ format: "dd/mm/yyyy", todayBtn: "linked", forceParse: false, autoclose: true, todayHighlight: tr...
asked by 05.07.2017 / 15:55
1
answer

How to remove some characters from a javascript var?

Well I have the following code: var tempo = "Rolling in 8.31..."; What I want is the string above, leave only the number 8, so that the var time, is as follows: var tempo = "8"; How can I do this? Thank you. @EDIT: Current Cod...
asked by 23.07.2017 / 21:07
1
answer

Grouping JSON using javascript reduce ()

Is there any way to group a Json using the Reduce() method of Javascript, as the example below: contas = [{id: 1, descricao: "AGUA", valor: 100, juros: 5}, {id: 1, descricao: "AGUA", valor: 100, juros: 5}, {id: 2, de...
asked by 18.07.2017 / 16:02
3
answers

Transform an Json Array into another JSON using node

Good morning, I'm having a problem mounting a JSON using NodeJS. I have a return from a giant SQL that basically follows the structure below. [ { "numDoc":"0000001", "OutrosCampos":"outrosDados", "itens":[ { "it...
asked by 10.07.2017 / 12:43