Posts by Felipe Volpatto • 114 points
3 posts
-
0
votes1
answer72
viewsA: Alert via jQuery not working as planned
The increase in the number of calls from alert happens because you are linked a new event every click on the element #btnWCFWSHttp. My suggestion would be to remove the events linked to the element…
-
2
votes3
answers1607
viewsA: Take the width of a text?
Without being in some element, there is no way. My suggestion is to create a wrapper to store the text and then remove it. var calculateTextWidth = function(text) { var span =…
-
7
votes4
answers1804
viewsQ: Should I check dates with Datetime or regex?
I have seen two different ways to check whether a date is valid. In a "modern" way, with DateTime: $date="2014-02-04"; $dt = DateTime::createFromFormat("Y-m-d", $date); return $dt !== false…