[wp-hackers] ShareThis plugin breaks prototype.js Class object.

Alexander Beutl xel at netgra.de
Wed Apr 16 10:33:20 GMT 2008


>
> rewriting your javascripts for jQuery


which really isn't hard since jQuery offers great tabs, slides, accordeon
features by plugin.
To be precise you do not even need to write javascript code with some of
them.
Please have a look at the user interface plugins you'll finde here:
http://plugins.jquery.com/project/Plugins/category/21
(well there are so many of them that not every one is on that page  but on 3
pages.)

If you do use extensive JS for anything check out the plugin pages first -
you will find that there is much work you can stop worrying about doing
yourselfe.


2008/4/16, Sabin Iacob <iacobs at m0n5t3r.info>:
>
> dubayou wrote:
>
> > This was driving me crazy.  I could access the 'Class' (that prototype
> > built) If i put my java above the wp_head() call but the java in my
> > plugin fails if I call
> >
> >
>
> erm, did you say Java? omg! (sorry, I couldn't help it)
>
>  ...
> > var TabMonster = Class.create({
> >        initialize: function(tab_list_container,options){
> > ...
> >  from within a hook to wp_head().
> > So does lightbox or any plugin that relays on the Prototype framework
> >
> > So it turns out that teh ShareThis plugin brings in some java from
> > w.sharethis.com that has its own Class def that over writes prototype.
> > lame.
> >
> >
>
> it is probably a different (older) version of prototype; had they used the
> script loader, it would load the Wordpress-supplied prototype library and
> ignore the rest, and wouldn't break everything else; but then again, their
> plugin would not be guaranteed to work across Wordpress versions
>
> this is a complicated problem, actually, because few libraries can
> accommodate several of their own versions running at the same time
> (actually, the only one I know is jQuery), and there is not much you can do,
> except for warning the users (or rewriting your javascripts for jQuery ;)).
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list