Questions tagged as 'javascript'

2
answers

Execute method that is inside the event "onclick"

When you answer this question , I came across the following situation. Note that onclick in x is an object with two methods, when the element receives the click executes the click method which in turn was to execute the...
asked by 21.01.2018 / 00:38
1
answer

Problems passing props to state of React component

Problems passing props to the state of the component, when in the component I make console.log(this) the props client is there with all fields, but when I do console.log(this.props) it shows me the empty state. this.state.clien...
asked by 23.09.2017 / 01:41
1
answer

When scrolling the page and arriving at a certain DIV the background color of the same one changed

I would like when someone scrolls the page and arrive at a certain DIV the background color of the same changed I tried to do so: JsFiddle But it did not work. What would be the right way to do it? Note: The site will be responsive so...
asked by 08.01.2018 / 16:28
3
answers

How to give the "modal" effect on a div?

I have div which is progress bar , and I would like this div to block interaction with div below it. Basically as long as this div progress bar was appearing, do not allow it to be possible to touch what is belo...
asked by 16.01.2018 / 13:15
1
answer

Controller getting parameter array as null

I am making an AJAX request, but I can not pass array ... My controller looks like this: [Route("imoveis/BuscaDados/Json/Listas/ListaQuartos")] public JsonResult ListaQuartos(int idEstado, int idCidade, int[] idsBairros, int[] idStatus)...
asked by 16.01.2018 / 14:09
1
answer

Hide ng-repeat item after 5 seconds

I'm doing a to do list app, I'd like to know how to hide an element after 5 seconds after I've selected the item through my checkbox. I have the following HTML structure: <body ng-controller="todoListCtrl"> <div class="container"...
asked by 08.09.2017 / 16:29
1
answer

Change image when clicking, when you click again return the initial image

I need to change the icon every time I click and hold that other icon until clicking again, then it goes back to the initial icon. How to do this? Below is the code I am using to create this menu. The part that calls the icon is <span clas...
asked by 26.01.2018 / 15:01
1
answer

Error changing checkbox state in Reactjs

I'm learning React still in the state part of a component. My activity is simple: when clicking the checkbox the status of the CHECKED component should change to true and change the value of a text message. The problem is that when I click I get...
asked by 01.02.2018 / 15:29
2
answers

Turning a value of a variable into a paragraph

I want to know how I can, instead of sending the result of the pro alert function, create a paragraph, for example. Remembering that this doubt is to help me with future projects, so I am putting a very simple code. Code: <!DOCTYPE html&...
asked by 07.02.2018 / 01:02
3
answers

Why is it that adding two values to decimals is not accurate?

I'm trying to sum two values with decimals of two variables: valor1 = 10.00; valor2 = 10.99; console.log(valor1+valor2); Adding the two values returns 20.990000000000002 and not 20.99 . When I add values with nonz...
asked by 02.02.2018 / 05:40