Figured it out.  It is pretty common for jQuery to conflict with Prototype, 
it seems.  See http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Just insert a script a jQuery.noConflict() call on every page that loads 
jQuery.  Then, wrap your jQuery code in an environment like:

     // Put all your code in your document ready area
     jQuery(document).ready(function($){
       // Do jQuery stuff using $
       $("div").hide();
     });

Or like this in parenscript:

(ps:ps
  (ps:chain (j-query document)
            (ready (lambda ($)
                     "simple"))))

I suppose the best idea is to define a script that just executes the 
noConflict function (which you include in your dependencies) and a macro 
environment for re-enabling jQuery's $ syntax.  Hope this helps others.

Zach KS

On Monday, April 23, 2012 4:49:00 AM UTC-5, Zach Kost-Smith wrote:
>
> Disclaimer: I am very new to actually producing Weblocks applications.
>
> I was wrapping a bit of jQuery code (Galleria) in a widget and found out 
> that just including jQuery in my dependencies breaks the auto-update of 
> widgets.  I wanted to see if this is just the expected behavior and it is 
> some kind of jQuery/Prototype conflict, or something else .  This might 
> very well be a some other kind of error.  Here is my test case:
>
> http://paste.lisp.org/display/129114
>
> Without jQuery, you can increase and decrease the number-box widgets.  
> With jQuery loaded, the links make no immediate changes, but after a page 
> refresh, the changes show up.
>
> Also, any thoughts on a cleaner way to do this kind of demo program 
> (although I am happy with everything except the inline style, but that is 
> just for convenience during development).  I am trying to write a tutorial 
> reflecting the current recommendations on how to use Weblocks while I am 
> learning (i.e. focus on widgets and dispatch facilities, leave out views, 
> downplay continuations).
>
> Zach KS
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/weblocks/-/v5W4BVWuvRsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en.

Reply via email to