Entries Tagged as "jQuery + Javascript"
Javascript dateDiff function
Posted by Paul Klinkenberg in jQuery + Javascript on July 5, 2010
I needed a function to check the difference between 2 dates in javascript. I couldn't find a suitable one, so I created this one:
function dateDiff(datepart, fromdate, todate)// datepart: 'w', 'd', 'h', 'n', 's'
{
datepart = datepart.toLowerCase();
var diff = todate - fromdate;
var divideBy = {
w:604800000 //1000*60*60*24*7
, d:86400000 // 1000*60*60*24
, h:3600000 // 1000*60*60
, n:60000 // 1000*60
, s:1000
};
return Math.floor(diff/divideBy[datepart]);
}
CKeditor 3 with free filemanager, now also for Coldfusion! v1.1.2
Posted by Paul Klinkenberg in CFML , jQuery + Javascript on March 5, 2010
I always used version 2 of the best wysiwyg editor out there:
FCKeditor. But it began to show it's age, and some functions didn't work
like I wanted. So I checked for an upgrade. And yes, did they
have one! A completely rewritten editor, now dubbed CKeditor,
created by CKsource.com. It looks good, works good, and was easy
to integrate.
But because you have to pay for the filemanager, and there is a free alternative, I created the CFM connector for CKeditor's alternative
Filemanager!
Test for existence of the Cortona 3D plugin
Posted by Paul Klinkenberg in jQuery + Javascript , Other stuff... on March 4, 2010
If you want to check whether your visitor has the Cortona 3D viewer plugin installed in the browser, you can use the following javascript:
Mangoblog plugin: viewCount v1.4 - updated 10 august 2010
Posted by Paul Klinkenberg in CFML , jQuery + Javascript , MangoBlog on December 31, 2009
Wouldn't you like to know how many people have read your blog post? Well, I do like so. In the blog system mangoBlog, which I use for this weblog, this wasn't a default option, and there wasn't a plugin yet to add this.
So, I created the Viewcount plugin. It shows the text "View count: xx" underneath this post...
A recursive jQuery.toJson() function
Posted by Paul Klinkenberg in jQuery + Javascript on June 13, 2009
I created a javascript toJson() function, which recursively converts any javascript object to json (javascript object notation).
The function relies on jQuery, and is added to the main jQuery object '$'. So, you can call $.toJSON(obj).
Recent Comments