This module looks great! However, I'm noticing that the 6.x version includes the entire JQuery library (v 1.2.1) as part of the module download. Drupal 6 has v 1.2.3 in core. Wouldn't it be much more efficient to use the core version rather than loading two files into the browser?

I also see the jquery.treeview.js plugin in here as well. Here as well, it would be more efficient to use JQ module to "centralize" the JQuery plugins you're using. This way if another module is also using the treeview plugin, the page won't end up with two (potentially conflicting) versions. I realize this is happening in a separate frame, but it still might help with efficiency. If you're concerned about the module dependency, you could do some if (module_exists('jq')) { -type stuff and just use it if it's there.

Just a thought.

Keep up the great work!!

Comments

chrisshattuck’s picture

Hi Jeff,

Thanks for taking notice! I have given this issue some thought, though I haven't come to any final conclusions yet. I developed the module for Drupal 5, and then learned enough about Drupal 6 to port it over, so I'm still learning about some of the 6 features.

My current thinking is that Super Nav acts nicely as a stand-alone module, and using js files outside of core allow me to work with those files as I need to. For example, I altered the cookie usage in the treeview module so that cookies persist between sessions. It's nice having that freedom, since sometimes it takes a while to get those kind of changes made by module maintainers. I know I probably won't be needing to make any changes in jQuery (and it's kind of painful to think that I would), but it's nice to know that I can and not affect anything else.

Typically, Super Nav would only get loaded once, so it's not a huge extra load having to get jQuery twice. However, now that I think about it, it would probably make sense to use the core jQuery in the 6 version, but I think I'd like to avoid the module dependency that JQ would necessitate. I'd like to make the module as accessible as possible, and just being able to install and go is a nice feature, I think.

Thanks again for your thoughts,
Chris

chrisshattuck’s picture

Status: Active » Fixed

FYI, I have switched to using core jQuery for the Drupal 6 version. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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