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
SET @wp_url_old = 'http://oldurl.com', @wp_url_new = 'http://newurl.com'; | |
UPDATE wp_options SET option_value = replace( option_value, @wp_url_old, @wp_url_new ) | |
WHERE option_value LIKE CONCAT( '%', @wp_url_old, '%' ); | |
UPDATE wp_posts SET guid = replace( guid, @wp_url_old, @wp_url_new ); | |
UPDATE wp_posts SET post_content = replace( post_content, @wp_url_old, @wp_url_new ); | |
-- if you have plugins that include serialized arrays of data in custom fields (such as some |
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
// This line is different | |
// it attaches a google maps listener that fires when an info window is opened and populated. | |
google.maps.event.addListener(referenceToInfoWindow, 'domready', function(){ | |
// scroll handler | |
var scrollToAnchor = function( id ) { | |
// grab the element to scroll to based on the name | |
var elem = $("a[name='"+ id +"']"); | |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="jquery.creep.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$("a").creep(); | |
}); | |
</script> |
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
<form action="/blah" method="post" class="squirrel"> | |
<!-- any form fields you like :) --> | |
</form> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="jquery.squirrel.min.js"></script> |
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
<input type="text" class="term_compare" value="36m"> | |
<select class="term_compare"> | |
<option value="36m">36 months</option> | |
<option value="4y">4 years</option> | |
</select> | |
<input type="text" name="term_compare" value="36m"> |
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
$(".calculator-amortization").accrue({ | |
mode: "amortization" | |
}); |
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
$(".calculator-compare").accrue({ | |
mode: "compare" | |
}); |
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
$(".calculator-loan").accrue(); |
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
{ | |
num_payments: 36, | |
original_amount: "7500", | |
payment_amount: 231.5782264902889, | |
payment_amount_formatted: "231.58", | |
total_interest: 836.8161536504012, | |
total_interest_formatted: "836.82", | |
total_payments: 8336.816153650401, | |
total_payments_formatted: "8336.82" | |
} |
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
var loan_info = $.loanInfo({ | |
amount: "$7,500", | |
rate: "7%", | |
term: "36m" | |
}); | |
// log the calculation data for test purposes | |
console.log( loan_info ); |
NewerOlder