This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* This function trims all strings in an object or array | |
* | |
* This is useful when sending ajax requests | |
* | |
* var vals = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DWTFYW License | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Simple overlay with text/html in the center and a delayed cancel button | |
* Requires jQuery | |
* | |
* if cancelTimeDelay is < 0 then there is no cancel button | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Formats date in mm/dd/yyyy format as yyyy-mm-dd | |
* | |
* Returns false on failure | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DWTFYW License | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* jquery plugin for showing tooltip on overflow | |
* | |
* USAGE: | |
* | |
* $("input, select").tooltipOnOverflow(); | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Show logs from a file that matches a regular expression. Matches multiline records. | |
* @param string $file The file to search | |
* @param string $search [optional] A string or regular expression to match; default = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Send POST request to a webpage from php and return the response. | |
* @param string $url The url of the webpage you would like to send the request to. | |
* @param array $data The post data to send with the request. | |
* @return string The response of the request | |
*/ | |
function sendPost($url, $data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DWTFYW License | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Set all multiple select elements to allow selecting multiple without using the ctrl key | |
* | |
*/ | |
(function($){ | |
$.fn.selectMultiple = function(){ | |
return this.mousedown(function(e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Example: | |
* positive terms -----------V-----------V---------V-------V-----------------------V | |
* console.log(getSearchTerms("this -is 'a string' '-with' positive -'and negative' terms")); | |
* negative terms ----------------^-------------------------------------^ | |
* Result: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Swap an image after it loads. Useful if you want to load low res image first then swap with high res after it loads. | |
*/ | |
(function ($) { | |
$.fn.swapImage = function (img) { | |
var $this = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DWTFYW License | |
* | |
* Author: Tony Brix, http://tonybrix.info | |
* | |
* Check if a point is within an element. | |
* Useful for mouseover on absolutely positioned overlapping elements. | |
* | |
* Example: | |
* $(document).mousemove(function(e){ |
OlderNewer