Cufon Javascript Editing - Small Job (quotes please)

Permalink
Hi All

I am working on a C5 installation and I have installed an addon (ajax refreshless page loading) that I got hold of from a developer (tony turpp), although its not yet released to the marketplace.

I need to get it to work with the cufon replacement I have installed by refiring the cufon script on refresh of my main content area. Can you let me know if you think it is something you'd be able to do and how long / how much it would be - please pm me nd I can give you the URL.

I asked Tony if he could suggest how I would go about it and he said:

"
you may be able to do this kind of thing if you know a little javascript. Check out the tutorial at the bottom of the page here:

http://inneroptics.net/toolbox/popup-block/instructions/...

he also said in response to a previous email about a shadowbox issue which I fixed:

I'm assuming what the issue with that shadow box effect is that the javascript init isn't firing because the page has already loaded. are you able to call that shadow box initialization script manually? If so, the window object does throw a rapid_page_load event when pages are loaded, so if you know javascript you can try hooking into that.

So its just hooking in the page onload script to fire my cufon script.

Many Thanks

 
jbx replied on at Permalink Reply
jbx
I think you can probably just put the following code on any page that uses the addon.

<script type="text/javascript">
  $(document).bind('popup',Cufon.refresh);
</script>


This is based on the popup addon...
Try that and let me know how you get on...

Jon
Tony replied on at Permalink Reply
Tony
hey Toby, forgot to mention, while the general approach is the same for the rapid paging package, this is actually the event that's triggered:

$(window).trigger('rapid_page_load', { 'cID':parseInt(jObj.cID), 'url':url, 'cPath': jObj.cPath, 'dateKey':jObj.dateKey } );

so you'd want to bind that to the event "rapid_page_load", not "popup", like:

$(window).bind("rapid_page_load",function(){ alert("do some stuff"); });