Posts by Dian Carlos • 186 points
17 posts
-
1
votes2
answers113
viewsA: Does the component import order interfere with performance?
When you just use require, the webpack compiles all its modules into a single javascript file, and according to the size of the modules (+ dependencies) this file will be large. So if it is a web…
-
5
votes1
answer586
viewsA: Create component to be used via npm
You must select all your components separately and indicate which index file (in this case the component file) is in package.json. Example of form input component using webpack First, create a…
-
0
votes2
answers480
viewsA: Aligning Counter on Icon
Add a position: relative to the link. <a href="car.php" style="position: relative;"> <span class="glyphicon glyphicon-envelope xs" style="font-size: 20px;"…
-
0
votes2
answers1781
viewsA: Keep image dimension inside div with flexbox
To maintain a div with a background-image responsive and in proportion, you should do the following. Let’s say you have an image the size of 2000 x 1250, and you want to keep that ratio in any…
cssanswered Dian Carlos 186 -
1
votes2
answers205
viewsA: Why does my ajax only work when you want?
Try to put the success or error check inside the ajax itself, this way; $.ajax({ //códigos do ajax atual success : function(result){ mudaPagina(result); } }); It is interesting to do the tests with…
-
3
votes2
answers1603
viewsA: Load content from another jquery file
Use the function .on() jQuery. It can detect elements that are loaded after processing the page. $('form').on('click', 'input[type=submit]', function(){ alert('Opá! Bão?'); });…
-
0
votes1
answer95
viewsA: css matrix3d, drag the element while maintaining distortion
You can use jQuery UI with the function .draggable(). Using $('.box').draggable(); you can move the box and keep the distortion. You would only have to make the circles follow the movement along…
-
1
votes1
answer571
viewsA: Take all html tags minor to line break
If the line break is the tag <br /> just put a second parameter in the strip_tags function and in it you will indicate which tags should be kept. For example: <?php //somente as tags…
-
0
votes1
answer29
viewsA: Open page directly on a given slide
You can use the jQuery, detecting the distance from the top of the page to li, and then make the page roll to that point. Take this example https://jsfiddle.net/diancabral/t9fx77b5/…
-
1
votes2
answers1324
viewsA: Parallax effect is not working on mobile
Mobile devices do not detect scrolling in the same way as browsers. Probably when you test on the phone, the effect only happens when the animation of the browser scrolling comes to an end. One tip…
-
0
votes2
answers99
viewsA: Problem with CSS Filter in some browsers
To apply the transition to a "filter" correctly, you must pass the new value of all filters that have been applied and not only what you want to change. For example: a { filter: hue-rotate(45deg)…
-
0
votes2
answers572
viewsA: Remove previous route from Google Maps
Use the function: directionsDisplay.setMap(null);
-
0
votes2
answers687
viewsA: Set <option> in edit - CAKEPHP
I don’t know how to use Cakephp, but my solution works, I’ve already made more than 6 real estate websites, and in all I used this function to select the city, neighborhood, state, etc that the…
-
0
votes3
answers3627
viewsA: How to Lock a Responsive Page in Portrait(Picture)?
One solution is a warning for the user to leave the device in portrait mode. Create a div position: Fixed that covers the entire content of the page, and place a notice saying that the site is only…
-
2
votes3
answers956
viewsA: Auto completing input with address
Behold Link. Example: var cidades = [ { data: 'es_afonso_claudio', value: 'Afonso Cláudio - ES' }, { data: 'es_alegre', value: 'Alegre - ES' }, { data: 'es_alfredo_chaves', value: 'Alfredo Chaves -…
-
0
votes3
answers1142
viewsA: Parallax Animation and Fade for Web
To make the div stop "walking" just capture the distance from it in relation to the top and put a limit, if you reach that limit it to, in case can be placed a position: Fixed. You can capture its…
-
2
votes5
answers6608
viewsQ: Capture dates of a text using regular expression in javascript
I have a function that returns data in JSON and places in certain places with jQuery. One of these data is a text that contains a period of dates (Beginning and end). Example of returned text:…