Posts by Felipe Duarte • 6,284 points
276 posts
-
12
votes1
answer1094
viewsA: Why is jQuery becoming obsolete?
jQuery is becoming obsolete? Not, jQuery is very good at what he set out to do which is to manipulate the DOM, it is logical that with JavaScript it is possible to do this, but we must take into…
-
3
votes1
answer174
viewsQ: Is it possible to remove the first sequence of the last letter of the regex?
I need help on something very specific, which involves good interpretation, is the following, I need to inform a word on regex example nt the last letter that would be t was extended to the first…
-
1
votes2
answers6887
viewsA: Create a modal with jQuery/Javascript only
It is possible to do it easily using flexbox and javascript pure, note the example... let open = document.getElementById('openModal'); let close = document.getElementById('close'); let fade =…
-
0
votes1
answer261
viewsA: Tabbar React Native
At setting position:absolute under a container it is necessary to observe whether it fills the height of the screen, usually the document.body initial fills, then just add it at the end with…
-
3
votes1
answer6791
viewsA: Image animation with Pulse effect and css brightness
Modifying a little the example of the miguel it is possible to obtain the following result... .pulse { animation: pulse 0.7s infinite; margin: 0 auto; display: table; margin-top: 50px;…
-
1
votes1
answer107
viewsA: Remove link ID when referenced with href
With CSS I believe that it is not possible without the marking of url, but how did you tag javascript, it is possible to do this with a few lines of language... function topFunction(){…
-
4
votes1
answer2391
viewsA: Vue 2: Take input value without using v-model
I do not recommend this blend of pure php with Vue, there are better solutions, but it is possible to get value by event.target.value, example... new Vue({ el: '#app', data : { value : '' }, methods…
-
0
votes1
answer1659
viewsA: Make include css and js files with vuejs
Just use the require Based on Commonjs For example when importing bootstrap you simply install it and pull with require. require('bootstrap'); to pull the css…
vue.jsanswered Felipe Duarte 6,284 -
1
votes3
answers334
viewsA: Problem in image rendering
When compressing the image, it will lose quality, even if it is good, it happens in all formats that use pixels, example bmp, jpeg, png... Because this type of construction only works well in…
-
1
votes2
answers482
viewsA: Style inside Vue.Component
This is not possible outside single file Components, because the component instance in the traditional mode does not provide the style option CSS native, but the question is, should provide? I do…
-
1
votes1
answer617
viewsA: Advantages x Disadvantages SPA Vuejs
Regarding the store of vuex I believe that it will not affect so much, it is all a matter of memory and as you use it, it is clear that in multiple mutations at the same time there are reasons to…
-
1
votes3
answers65
viewsA: PHP - using isset and Gets
The right thing would be... if( isset($_GET['order']) && isset($_GET['preco']) && isset($_GET['comprador']) ) echo 'os 3 existem'; else echo 'os 3 não existem'; Can change the…
phpanswered Felipe Duarte 6,284 -
3
votes1
answer75
viewsA: What is the most effective way to develop an Html5 or js code?
The correct would be to compare example native functions... onclick straight into HTML onclick in javascript attachEvent addEventListener jquery probably implements addeventlistener and…
-
1
votes3
answers5001
viewsA: Hover effect on JS
See your code working... var $JQuery2 = jQuery.noConflict() $JQuery2(function() { $JQuery2(".bt_pagamento-facilitado").hover(function(){ $JQuery2(".bt_criacoes-exclusivas").addClass("redesAl"); });…
-
1
votes2
answers74
viewsA: What is the easiest way to classify DOM elements using pure Javascript?
Really sort is the easiest way, but to apply directly to DOM, without changing the structure, it is necessary to apply a regular expression and format the value so that it can be treated in the…
javascriptanswered Felipe Duarte 6,284 -
1
votes2
answers458
viewsA: Put "little hand" in the iframe
You can use the property cursor of css, for hover use grab for active use grabbing, example... div { width: 150px; height: 150px; background: green; cursor: grab; cursor: -webkit-grab;…
-
0
votes1
answer834
viewsQ: How to deploy a vuejs (Browserify) application to Heroku?
I lifted the server with express, but using a schematic for the webpack because I found nothing related to browserify, follows the code... // server.js var express = require('express'); var path =…
-
1
votes2
answers114
viewsA: If it doesn’t fit in the div, show: more x results
Good really, with the items being rendered by PHP it gets a little difficult and any solution will sound like a gambiarra, but come on. You can use the property text-overflow of CSS, which basically…
-
1
votes2
answers67
viewsA: Condition to appear link does not work
You’re concatenating where you don’t need to concatenate... $function = '<li><a href="Alt_Papel.php"> Alterar papel - D </a></li>';
-
1
votes3
answers717
viewsA: How do I get the name of an input
I believe the simplest way would be with querySelector, for various elements could use the querySelectorAll... console.log(document.querySelector('input').name); <input type="text"…
javascriptanswered Felipe Duarte 6,284 -
2
votes3
answers172
viewsQ: Is it possible to find darker/lighter shades from a hexadecimal?
Given any color in the notation Hexadecimal, is it possible to find the same in lighter or darker tones? example... div { height: 50px; width: 150px; display: inline-block; text-align: center;…
-
1
votes2
answers265
viewsA: Create Directive Attribute for Date Month/Year in Angular JS
In angular the name of the Directives are standardised by Camelcase, that is, when defining the name formatDateMesAno, in the HTML should be defined as format-date-mes-ano, until why the HTML is…
-
4
votes5
answers1389
viewsA: Disable body click for a period of time
It is possible to disable all click event, just assign a stopPropagation() in the root event, so all others are rendered impossible until the listener out removed... ativo = false; function…
-
0
votes1
answer153
viewsA: Play variables to be parameters in the API
An interesting method is to access via Curl, is similar to an ajax request, but with PHP, also check if the API has any comprehensive documentation... Usually for authentication the method is GET,…
-
1
votes2
answers845
viewsA: How to find and select option with select-specific label with jQuery
Use text $(document).ready(function(){ $('select option:nth-child(2)').text('alterado').attr('selected', 'true'); }) <script…
-
0
votes1
answer254
viewsA: Dropdown menu with v-if vuejs
I did as follows, each menu item will have an object ativo, which will switch between the mouseout and the mouseleave... new Vue({ el : '#app', data : { modal : { filhos: { estilos : { ativo: false,…
-
5
votes1
answer247
viewsQ: What is Atomic web design?
Superficially I found very interesting this approach, but before going deeper I would like to know exactly what it is about, too, if it is possible to use it in short scale projects, or even in a…
-
1
votes1
answer254
viewsQ: Dropdown menu with v-if vuejs
How to add an effect dropdown to this vertical menu, so that when placing the mouse on top it opens the ul daughter if she exists. I thought I’d do it with v-if by clicking on li Dad, but I don’t…
-
1
votes4
answers252
viewsA: css does not work with div added with append
You referenced ul 2 times #list_arquivos ul li #list_arquivos li that’s enough...
-
0
votes1
answer139
viewsA: Vuejs: is it possible to know which was the last object changed?
Just listen to the elements with watch, when realizing that the value has been changed, it is possible to change again to true, example... new Vue({ el : "#app", data : { paso1: false, paso2: false,…
vue.jsanswered Felipe Duarte 6,284 -
1
votes4
answers1377
viewsA: filter object by javascript array
Just go through with for and do the check let alunos = [ { nome: 'teste', idade: '15', turma: 'turma 1'}, { nome: 'teste2', idade: '16', turma: 'turma 2'}, { nome: 'teste3', idade: '12', turma:…
javascriptanswered Felipe Duarte 6,284 -
2
votes1
answer1194
viewsQ: How to know if the scrollbar is active and its size?
I have a menu that opens based on the coordinates X and Y of click, but when it was opened at the ends it ended up extrapolating the layout, I arranged it, but when the scrollbar lateral is active…
-
2
votes2
answers1980
viewsA: How to put frame on an image?
Set your frame to the background and Center the image with a frame padding, so any image you add will adapt; div { height: 300px; width: 300px; background-color: gray; background:…
-
2
votes1
answer76
viewsA: Javascript - Content of a TD comparing to a variable
Note that the elements in td are spaced, the innerHTML take this spacing, and when checking it will interfere, an alternative is the innerText that takes only the text area, example... function…
javascriptanswered Felipe Duarte 6,284 -
1
votes2
answers102
viewsA: How to import mixins into single file Components?
I arranged it this way methods/metodo_Div.js export const metodoDiv = { methods : { inserirDiv (event) { let componente = new flexdiv().$mount();…
-
0
votes2
answers102
viewsQ: How to import mixins into single file Components?
When trying to import mixin the following problem occurs Error in render: "Typeerror: Cannot read Property 'Components' of Undefined" But there is nothing abnormal in the Components because when…
-
1
votes3
answers638
viewsA: Block positioning with FLEX-BOX
Only with flexbox I believe it is not possible, but you can join it with float, to get the result, the DVD solution is ideal if you do not have to worry about support between browsers, since grid…
-
1
votes2
answers83
viewsA: 3 Div’s 100%, 30% each, one on the left another in the middle and one on the right
To hold 3 elements of equal dimensions in a container, you have to use something that can calculate these exact dimensions, because think to me, when dividing 100/3 we have an infinite number, so…
-
0
votes5
answers1555
viewsA: How to display DIV if radio is marked?
To the letter I believe this is it from here... let radio = document.querySelectorAll(".rd"); for(let i = 0; i < radio.length; i++) { radio[i].onclick = function(){ let div =…
-
0
votes2
answers1010
viewsA: How to access one component within another?
To solve I had to instantiate Vue again and reference the component... <template> <div id="containerPrincipal" @click.stop="teste"> ... <template> <script> /*Other…
-
0
votes2
answers1010
viewsQ: How to access one component within another?
I’m using the single file components, but I can’t access a component via another component, follow what I tried... <template> <div id="containerPrincipal" @click.stop="teste"> ...…
-
2
votes2
answers57
viewsA: How to draw dots between an image and another with HTML5 and CSS3?
An alternative is to use the border style dotted and interleaving each image, it is also necessary a container to centralize the elements, example... .containerImgs { display: flex; flex-direction:…
-
0
votes3
answers307
viewsA: Equivalent to javascript wrap
Unfortunately I did not find anywhere an equivalent function, where you pass an element and an html string as container, so I made my own, is working perfectly, I will leave here for future…
-
1
votes3
answers307
viewsQ: Equivalent to javascript wrap
The jquery has a method called wrap that basically adds a container to the desired element, but I can’t find the javascript method, anyone knows?
-
0
votes1
answer86
viewsA: Vue Compile when inserting into the DOM
I managed to solve First of all, I believe which components added dynamically can not communicate to the internal methods of the instance Vue but rather with their own methods, finally, to add a…
-
0
votes1
answer86
viewsQ: Vue Compile when inserting into the DOM
I need to insert a compiled element into DOM, but it will be inserted in a random place, not in a predefined place as this documentation... var res = Vue.compile('<div><span>{{ msg…
-
9
votes1
answer253
viewsQ: What is it, Reason?
I recently heard of Reason, but I don’t know what it is, some call it a programming language, others a syntax powered by Ocaml, I know that it’s led by Facebook and that it’s very good for simple…
terminologyasked Felipe Duarte 6,284 -
4
votes4
answers829
viewsA: Javascript / Jquery - Means to remove the contents of a <TD>
To remove individually simply assign a Trigger to each td, and pick them up with the this. let td = document.querySelectorAll('td'); for(item in td) td[item].onclick = function(){…
-
2
votes2
answers133
viewsA: Treatment JSON
{ "Token": "e27bb0a7-e65b-4cc3-a82e-7a2a3c26a248", "Codigo": 0 } é a resposta do servidor em `JSON`. response takes this answer in object form, so just store it... $.ajax(settings).done(function…
-
0
votes4
answers1375
viewsA: Count options from a select
You can use childElementCount from the example javascript... if(document.querySelector('select').childElementCount > 1) console.log('mais de 1 > submit: ' +…
jqueryanswered Felipe Duarte 6,284