Posts by N. Dias • 647 points
28 posts
-
1
votes1
answer45
viewsA: Page ratio in Html5
one possibility is to change the margins in the class .table-wrapper and correct the class margins .table-title according to the padding .table-wrapper { margin: 30px 15%; padding: 20px 25px; }…
-
2
votes1
answer137
viewsQ: Css in all options except one
I am trying to apply a css to an option tag. In case I would like only the options that have value starting with 2 stay in blue, as the example below: $('.select-user option').each(function(){…
-
2
votes1
answer157
viewsA: Problem generating javascript graph using Spring
The service apparently is ok. So, according to the question, I evaluated the front and would like to recommend some corrections. You have not provided the css and if you do not know it is necessary…
-
0
votes1
answer235
viewsA: Polygon events on google maps with javascript
To add events to a polygon, you can save the reference to the polygon and assign an event using addListener For example: var polygonCoords = [ {lat: 25.774, lng: -80.190}, {lat: 18.466, lng:…
-
2
votes1
answer58
viewsQ: Change Javascript string characters for successors
I have a string, for example, acbd and want to get another string bdce, formed by the successors of each character. In my searches find a possible way that is to transform the string into an array…
-
0
votes1
answer104
viewsQ: Detect if pwa has been added on desktop
I am developing a website, using the concepts of PWA, for management. My intention is to allow the user to add it to the Work area. From the moment he does that, I intend to hide a div <div…
-
0
votes1
answer110
viewsQ: Selector Parent css
Is there any way to select using only css the images whose parent element is a <div class="img-parent" ></div>, that is to say, from a child element? <div class="img-parent" >…
-
2
votes2
answers102
viewsA: How to assign the callback variable "cursor.toArray(err, doc)" to an external variable?
The problem is just Synchronization You are experiencing this error because the find() method is asynchronous, in which case you have a Promisse that may not have been solved before the…
-
1
votes1
answer1201
viewsA: update list field without refresh ajax
I believe you should exchange the tag form for an ajax method, next to a button click event Remove this stretch: <td> <form id="testeForm" action="<c:url…
-
3
votes1
answer9360
viewsA: Error: [Object Htmlinputelement]
In this section, the value function digGet(){ //Correcao aqui //Antes login era um elemento do Dom e nao o valor do elemento var login = document.getElementById("user_login").value;…
-
1
votes1
answer34
viewsQ: Listening to an event in cookies
I’m developing an application to be used in two browser tabs. Eventually a tab modifies a cookie, so I need to refresh the other tab to load the correct information. That way you can listen to a…
-
1
votes4
answers1377
viewsA: filter object by javascript array
One possible way is to use filter and add; var alunos = [{ nome: 'teste', idade: '15', turma: 'turma 1' }, { nome: 'teste2', idade: '16', turma: 'turma 2' }, { nome: 'teste3', idade: '12', turma:…
javascriptanswered N. Dias 647 -
1
votes1
answer66
viewsA: How to filter checkbox list as you type? (search neighborhoods)
Using the Keyup event in an input, then a timeout to delay the filter, ie running 300ms after the user stops typing, would look like this: var $divs = $('.span3'); var timer_ = null;…
-
2
votes1
answer121
viewsA: Sort object descending in Java
As your ultimate goal is to get the word, just use the function below: var str = 'string muito grande para o _ comentário'; var count = {}; str.split('').forEach(function(v) { if (v === ' ') return;…
-
0
votes4
answers381
viewsA: remove text inside small without raising the "a" tag with jquery
You can change html this way $("#tag-small").html($("#tag-small a")) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <small id="tag-small">…
-
1
votes2
answers2097
viewsA: Format date in javascript
If it is a string "YYYY-MM-DD" and you want to get another string " DD-MM-YYYY" you can do so "YYYY-MM-DD".split("-").reduce(function(p, c){ return c + "-" +p }) or create a function for this…
-
1
votes1
answer351
viewsA: Select elements by holding and dragging the mouse
There is a plugin Jquery q does this. It is very easy to use, link: https://jqueryui.com/selectable/ $( function() { $( "#selectable" ).selectable(); } ); #feedback { font-size: 1.4em; } #selectable…
-
1
votes3
answers173
viewsA: Why my load does not load after Submit
When you submit a form there is a refresh on the page, for this reason you lose the context for the load you want to perform. A very simple solution is to use ajax, without the tag form for example.…
-
6
votes2
answers554
viewsQ: How to create a Function and call your methods without using new, similar to jQuery’s $ ?
The $ (jQuery dollar) is a Function, however it is possible to access its methods as if it were an object through the operator ".". Someone could explain, in what way I could do this in a Function…
-
0
votes5
answers1555
viewsA: How to display DIV if radio is marked?
Using jQuery, there are several ways to solve your problem, here I list a: var viewDivs = { init: function(){ var that = this; //Elements that.inputs = $('input:radio'); that.divs =…
-
1
votes1
answer724
viewsQ: Writing Html using javascript
I was studying some jquery plugins and realized that to create html, the programmer wrote each line in an array and at the end used Join: var tpl = [ '<div class="popover…
-
0
votes1
answer81
viewsQ: Get Css properties
Someone knows how to identify, using javascript, only the css properties of a class, for example: .in-text{ color: red; font-weight: 500; } html <label class="in-text">Digite um…
-
1
votes1
answer219
viewsA: Google Maps API
To show only a specific area, knowing its limits, use the Latlngbound API, as in the example https://jsfiddle.net/t30y8vwL/ var map; function initMap() { var myLatLng = {lat: -16.461, lng:…
-
6
votes1
answer79
viewsQ: Classes in Javascript
I was researching about creating Javascript classes and noticed the example below: var Greeter = (function () { function Greeter(message) { this.greeting = message; } Greeter.prototype.greet =…
javascriptasked N. Dias 647 -
0
votes1
answer36
viewsA: I would like a user to register a single limit of markers on the map
At first as a single limit of markers. the ratio would be 1 to 1 for another table with reference to pay insurance; only dependency q noticed for the indication of the quantity, normalizing.…
-
0
votes1
answer1933
viewsQ: limit of requests Google maps api
I am developing a web application with google maps api javascript. The limit is 25,000, however, is crashing in the tests I have done. Someone with good knowledge of could inform: Is there any time…
-
0
votes3
answers354
views -
-2
votes2
answers98
viewsA: Repeat condition in WHERE at the time of query
You can also use concatenation. For example, if you click Mark a string " ... and tag = voks " it is added at the end of the query. So with the two clicks, there would be " and mark = voks and color…