java script / jquery does not always execute...

bsenftner - July 24, 2009 - 22:56
Project:Agregado
Version:6.x-2.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've been trying to track down an issue with some jquery java script not running on a site using the Agregado theme - to be specific, the java script only runs if the firebug console is open. Also, it always run in Safari OS X, but no where else (unless it's firefox with firebug active and it's console visible.)

After exhausting several debugging methods, I tried switching to another theme, and it works perfect in that other theme (Acquia Slate).

Here's a forum thread describing the situation:
http://drupal.org/node/529296

Now, since I can get this working with that other theme, I need to switch to that theme. So my site will not be a good test case for solving this issue.

To support your figuring out what is going on, I've attached a zip of the theme files so you can recreate the situation. Note that I've made modifications to the css and changed the main images, but the other logic of the theme is untouched. (I only made changes to recolor the theme; I wanted something softer.) Oh, and I added a template.php, but it's only content is commented out, as is described in the forum thread linked above.

The only other info you'll need is how to create a page that the logic inside blake.js will operate upon:

<a href="#" rel="peekaboo_1" class="content-hideable">(show/hide details)</a>

The above is a link that my java script will use to toggle display of:
<p id="peekaboo_1"> any content</p>

So, to create any number of show/hide blocks of content, just have an "id" in that content matching the "rel" in a link whose class is "content-hideable".

AttachmentSize
agregado_modified.zip321.13 KB

#1

bsenftner - July 25, 2009 - 02:02
Status:active» postponed

I think I may have spoke too soon... I'm betting the same problem now in that other theme... must be something dumb I'm doing...

#2

ktleow - November 22, 2009 - 08:37
Status:postponed» fixed

Hmm?

Assuming problem fixed, no activity for weeks.

Please feel free to re-open if you have any questions.

#3

bsenftner - November 22, 2009 - 18:53

I ended up using

<?php drupal_add_js( drupal_get_path('theme', 'acquia_slate') . '/blake.js', 'theme', 'footer' );?>

inside the body of my pages, and it worked. I also had to remove all debug console output from the javascript.

#4

System Message - December 6, 2009 - 19:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.