Posts tagged BNR exchange rate
How to add a nice jQuery slider
Nov 15th
This weekend fun was adding to my website the cool sliding control from Jérémie Tisseau website. That pretty it was, I immediately started thinking it as a container to my BNR exchange rate page. The coded worked perfectly, with few modifications.
Firstly, WordPress uses the $ operator for Prototype library, so if you want to add your jQuery library the invocation to WordPress Firebug will report the error “$ is not a function”. So here’s the fix: you’ll have to change any occurrence of the $ sign to jQuery. Just like in the following example:
$(document).ready(function() {
// Expand Panel
$("#open").click(function(){
$("div#panel").slideDown("slow");
});
// Collapse Panel
$("#close").click(function(){
$("div#panel").slideUp("slow");
});
// Switch buttons from "Log In | Register" to "Close Panel" on click
$("#toggle a").click(function () {
$("#toggle a").toggle();
});
});
TO:
jQuery(document).ready(function() {
// Expand Panel
jQuery("#open").click(function(){
jQuery("div#panel").slideDown("slow");
});
// Collapse Panel
jQuery("#close").click(function(){
jQuery("div#panel").slideUp("slow");
});
// Switch buttons from "Log In | Register" to "Close Panel" on click
jQuery("#toggle a").click(function () {
jQuery("#toggle a").toggle();
});
});
cPanel: using Cron Jobs
Aug 10th
First – what is a cron job? It is a piece of software which can be run at specific times by the cron service. By example, one could set a cron job to update his application exchange rates from a server every day at a specific hour so its application will be up to date.
I used it because the Romanian National Bank doesn’t have a proper page to check for exchange rates – they present just the numbers, but no trends, no charts – nothing visual. Too bad for them! For me it is actually a good way to refresh my PHP / MySQL and apache management skills. Because this Cron stuff is actually new for me, I composed a small tutorial in order to be easy for me to remember and for you, my dear readers, to get quickly the information required for a quick start. So let’s get going with our ..