Posts by Fábio • 379 points
18 posts
-
0
votes3
answers2011
viewsA: jQuery Run CSS Animation only when content is visible to the user
What I was doing was a function that can be detected if the user is viewing or not... To find out what the user is seeing var init = $(window).scrollTop(); var end =…
-
2
votes1
answer73
viewsA: Calculating a value proportional to the date of the month
Long live, What I thought was: to know how many days I had this month. to divide the value by the days of the month... $valueMonth = 120; $dateInit = '2016-06-15'; $totalDays = date('t',…
-
0
votes2
answers769
viewsA: Geolocation + Ajax + PHP - what am I doing wrong?
The match, that’s all: //$("#localizacao").submit(function (e) { // e.preventDefault(); // alert(dadosajax); $.ajax({ type: "POST", url: "teste6.php", data: dadosajax }); //});…
-
2
votes2
answers157
viewsA: How do I get reply json in php?
Long live, $data = file_get_contents('www.meusite.com'); $data = json_decode($data,true); From there it’s like you have a normal array.. Probably in your case you’ll have to use:…
-
1
votes2
answers78
viewsA: PHP 5.5 implemented the foreach functionality with list. What are the benefits of this?
I think the idea is for more "weird" things like: foreach ($array as list($a, $b, list($c, $d))) { echo "A: $a; B: $b; C: $c; D: $d;<br>"; }; Sometimes a foreach can do all the work... But as…
-
0
votes2
answers420
viewsA: PHP - Form with validation of fields sent over and over
The simplest way, without messing with the code too much would be to just control whether or not it has already been submitted... $('input[type=submit]').on('click',function() {…
-
2
votes1
answer2033
viewsA: PHP timer
Cron job is the right way to do it ;) Calls an index.php every minute: 1 * * * * wget www.meusite.pt/crons/index.php Then inside that php file just do a "ifs": ore_user_abort();…
-
4
votes5
answers6498
viewsA: Clear Browser Cache after Version Upgrade
It is enough that the name of the JS and CSS file or files has a variable name.. For example: What you should have now: omeucss.css || omeujs.js What you should get: omeucssv12 || omeujs45.js This…
-
0
votes2
answers63
viewsA: Avoid zooming inside a textarea
First of all don’t forget the viewport.. if you don’t have it, you don’t need to read any more, there’s your problem ;) In css there is the :focus can use this to work the element when it’s in focus…
-
-1
votes2
answers884
viewsA: How to stretch an element to the end of the screen?
Long live, You can see the example here: http://codepen.io/anon/pen/mVNZqr You just have to use: height: 100%; position: absolute; Hug and good luck ;)…
-
1
votes2
answers591
viewsA: How to make an automatic Divs transition in Jquery?
Long live, https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout http://www.cprogressivo.net/2013/03/O-que-sao-e-como-usar-funcoes-recursivas-em-linguagem-C.html When starting…
-
0
votes1
answer316
viewsA: Layout to adapt to browser resizing
I didn’t understand it very well. but when making one Responsive layout It is mostly used css, with media querys, and this way it is possible to see the changes in real-time by putting the smallest…
-
2
votes2
answers1909
viewsA: Bar at the end of url with . htaccess
Long live, In my case I use so: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\..+$ RewriteCond %{REQUEST_URI} !/$ RewriteRule (.*) /$1/ [R=301,L] Hug ;)…
-
1
votes2
answers339
viewsA: Event javascript to scroll over an area or div
Long live, Use the ".on" to catch the event. Actually there are two events, to work in the different browsers.. "Dommousescroll mousewheel" $('#div').on('DOMMouseScroll mousewheel', function ( event…
-
2
votes2
answers109
viewsA: Good development practices (Use of Float, Brs, Api)
1- No doubt avoid using BR, use css for this (padding or margin).. It is a problem to use this type of css tags/property because if you are doing the template for mobile and desktop you will find…
-
0
votes1
answer44
viewsA: how to connect to an ftp server
Long live, I usually use this class you find on github: https://github.com/Nicolab/php-ftp-client $ftp = new \FtpClient\FtpClient(); $ftp->connect($host, true, 22); $ftp->login($login,…
-
1
votes0
answers63
views -
1
votes1
answer170
views