Questions tagged as 'javascript'

1
answer

Attribute not defined in a Vue object

I'm doing a few things in Vue. And I have a problem here. Apparently there is a mistake here and I have no idea what is wrong. The console says that title has not been set. var cadastro = new Vue({ el:'#cadastro', data:{ pagina...
asked by 17.07.2017 / 23:41
1
answer

How to copy attr from page to clipboard with JavaScript?

It has an element of a page ( attr ) that I want to copy to Clipboard (Ctrl + C) automatically every time I enter it. I've been able to fetch it with JQuery. It looks like this on the page: <div class="image-constrain js-image-wrap image-co...
asked by 27.09.2017 / 23:15
1
answer

Problems with javaScript special characters

I'm using the script below and working almost perfectly was not a though, it's a search script, when the user types "?" (query) appears in the search the following expression "% 3F" (percentage, three and F), some other characters like!, @, # al...
asked by 22.09.2017 / 21:18
1
answer

Loading on demand

I am trying to make a load system on demand and I do not know anything about ajax and I did not quite understand how it would work. I have a post system that shows a 10 post quantity on my page, and when I click on my second page (pagination)...
asked by 25.05.2017 / 05:20
1
answer

Calculate space between Div and Body

I want to know the space between the bottom of Div A and the bottom of Body. I read about $.offset() , but this always returns me 0. PS: I want only in relation to what appears on the screen. If the body is larger than the screen, I wan...
asked by 18.05.2017 / 14:33
1
answer

CSS attribute in innerHTML, how to use it?

I have span that depending on the value I wanted it to be red for divergence and blue if the data is acceptable, I tried this way: getElementById('span').css('color', 'blue').innerHTML = <valor> But this did not work, I saw in...
asked by 22.05.2017 / 20:57
1
answer

Regex for capturing fixed strings in HTML and JS codes [closed]

I am doing some automated testing for a legacy project in the MVC template, however there is a requirement for one of them that is capturing all fixed strings in HTML and JS codes. Since the project company is undergoing an internationalizatio...
asked by 11.05.2017 / 17:37
1
answer

How to detect changes in the Document Object Model (DOM)

Every change in the DOM (Document Object Model), whether it is an inclusion, deletion or even a modification to some element I would like to perform a function, is there any "simple" way of doing This? If there is no way to detect such spec...
asked by 10.03.2017 / 13:01
1
answer

I have a geolocation code, but chrome does not give me permission to run it

I'd like to know, your I have to give some sort of permission, for the code to work on Chrome, because in Mozilla it can give me the location. Follow the code below ' function writeAddressName(latLng) { var geocoder = new google.maps.Geoc...
asked by 09.05.2017 / 18:03
1
answer

Delete item from an Inioc array 2

I'm having a hard time understanding how the splice () method works. I need to delete items from an array, when I click on (x), eg: <ion-item *ngFor="let item of data"> <ion-grid> <ion-row> <ion-col width-50>...
asked by 25.04.2017 / 12:03