More JAddTo Features
I had some more ideas for the JAddTo plugin and so I just added them in now. This plugin is rapidly turning from a single-purpose plugin (put “Add To” links on a page) into something that may be of more general use and something that can be more customized.
This version adds custom CSS Classes (so more than one JAddTo item can be on the same page and can look different), adds the ability to hide the title text, and adds the ability to show the icon titles on the left or right of the icons (or keep them hidden).
Check it out at: http://www.jasons-toolbox.com/JAddTo/

Comment by gavinmroy — October 26, 2006 @ 5:57 pm
Hey, I’ve been developing an app with jHeartbeat (thanks for the cool plugin btw). I was wondering if you planned on releasing it under a license (MIT for example like jQuery). I’m concerned about distributing it in my app without knowing what the license could/would be. Thanks again for a cool plugin.
Comment by jasonlevine — November 6, 2006 @ 11:41 am
jHeartbeat is free to use for any commercial or non-commercial project. I just ask that I be credited somewhere. Doesn’t need to be in huge, bold letters or anything. Just make some small mention of jHeartbeat and my site where ever you feel it is appropriate.
You are right that I should come up with a more formal license, though. I’m looking at the MIT license right now and that looks pretty good. In fact, consider jHeartbeat and my other JQuery plugins/scripts to be “unofficially” covered by the MIT license. (By “unofficially”, I mean that they are under that license now but I probably won’t get to update the documentation for a bit.)
Comment by ray — December 1, 2006 @ 3:19 pm
Hi Jason,
Good work with jHeartbeat!
My question:
———–
You mention that:
“…can use the callback function to manipulate this (returned) data, if needed..”.
Being new to jQuery, could you show a simple “hello world” example for the callback function?
Suggestion:
suppose we’d like to multiply times 2,
the number returned in the DIV by “heartbeat.asp”?
What would the actual samnple code be?
Thanks, Jason!
ray
Comment by jasonlevine — December 28, 2006 @ 8:42 am
ray,
The JHeartbeat page has the generic code. However, a simple “Hello World” application might look like this:
$(document).ready(function() { $.jheartbeat.set({ url: "heartbeat.asp", delay: 3000 }, function () { alert("Hello World!"); }); });A function that might take the number returned and multiply it by 2 would look something like this:
$(document).ready(function() { $.jheartbeat.set({ url: "heartbeat.asp", delay: 3000 }, function () { alert(parseInt($("#HeartBeatDIV").html())*2); }); });I hope this helps.
Comment by bleen18 — January 29, 2007 @ 3:28 pm
jHeartbeat is great, but how do you make it stop beating? I’m using ti to check the status of a slooow script. Once the script is complete though, I want the page to stop checking.
Thanks!
Comment by bleen18 — January 29, 2007 @ 5:33 pm
Regarding my last comment .. I figured it out and thought I’d share:
clearTimeout($.jheartbeat.timeoutobj.id);
With that though, another question: in the “set” function, shouldn’t the first few lines be:
if (this.timeoutobj.id > -1) {
clearTimeout(this.timeoutobj.id);
// note the ‘.id’
}
Comment by howie — February 9, 2007 @ 6:20 am
Is it possible there’s a memory leak in JHeartbeat? I’ve been playing with it for the last couple of days, on something that fetches JSON updates every few seconds from our monitoring system, and uses that to update a UL with entries.
It works nicely now, but I left it running overnight, and came back to a 1GB firefox! Since then, I’ve ripped out ALL of my code, leaving just an empty every-2-seconds heartbeat, and left it going in IE, and I can still watch the memory usage grow every tick…
This is my first go at this kind of stuff, so I’m prepared to believe it’s me. Is there any more scientific instrumentation for looking at this stuff?
Comment by erica — April 12, 2007 @ 11:06 am
I downloaded http://www.jasons-toolbox.com/JTicker/JTicker_With_JQuery.zip, but JTicker doesn’t seem to be working when I view index.html on my machine- neither with your xml file or with my own. All I see fading in and out is “JTicker 0.5 Beta.” Any ideas? This is exactly what I want to implement on my site and I want it to work soooo bad! Also, if you can answer that question, is there any way to display more than one item at a time? So, for instance, four headlines - fade out - the next four headlines - etc.
Comment by peter — April 22, 2007 @ 1:51 am
I would like to suggest a change to jHeartbeat
IE caches, and I saw how you send various HTTP/HTML headers to stop the caching. I would like to suggest adding a counter instead,
which would force IE to request the result from the server and not make anything time dependent:
In the changes, show below, I have added a counter.
If the user has already supplied a url with a parameters, then the extra parameter starts with a & instead of a ?.
options: {
url: “heartbeat_default.asp”,
counter: 0,
delay: 10000
},
beat: function() {
var c = this.options.url.search(/\?/) == -1 ? ‘?’ : ‘&’ ;
var newUrl = this.options.url + c + “counter=” + this.options.counter++ ;
$(”#HeartBeatDIV”).load(newUrl);
this.timeoutobj.id = setTimeout(”$.jheartbeat.beat();”, this.options.delay);
this.beatfunction();
Comment by peter — May 20, 2007 @ 6:25 am
The memory leak as pointed out in comment 7 is really problematic. Is there any way of fixing it?
Thanks
Peter
Comment by jasonlevine — July 24, 2007 @ 6:45 am
howie, It’s possible that there’s a memory leak in there somewhere. When I get some time, I need to update this plugin for the latest version of JQuery.
Comment by eshu — November 12, 2007 @ 5:51 am
thx for a nice plugins…
i have one question regarding JTicker
is it possible to extend somehow support for other character encodings..
for example im using Windows-1250 and can not get some special character..
i know that that is an issue…
its pitty that half of the world can not use that nice technology ;-(
thx
mario