Page 1 of 1

s2Member conflict with some javascript theme

PostPosted: August 6th, 2010, 2:10 am
by stefanogaruti
Hi Jason!
I'm seting up a little membership using your great plugin(plugin? no, it's really more than that!!!!) and a theme that use some javascript to show an imsges slideshow.

Unfortunaltely when I activate s2Memeber the slideshow stops working. I'm sure that the conflict is between the theme and s2Member because I deactivated all the plugin and the carousel works, than activate only s2Memeber and it stops.

I'm pretty sure that there is a conflict between the theme js and that little javascript that s2Memeber outputs:
Code: Select all
<script type='text/javascript' src='http://localhost/wpdaZero/?ws_plugin__s2member_js_w_globals=1&#038;qcABC=1&#038;b5aeb75e83ca9e20f956c89f4a375366&#038;ver=1.0051280136190'>


Unfortunately even if I'm quite expert and proficient in php and WordPress, I'm pretty illiterate in Javascript so I'm unable to address this problem.

The live site is: http://www.wpdazero.it: you can check the html source there to see what js is loaded by the theme.

Thanks for your great help!
Stefano

p.s.
just for information, as the live site is only in italian, it's a "cooming soon" membership with videos to learn "WordPress from scratch"

Re: s2Member conflict with some javascript theme

PostPosted: August 6th, 2010, 2:41 am
by stefanogaruti
UPDATE:
I resolved the problem by moving up the
Code: Select all
<?php wp_head(); ?>

call in the theme header (that is the function that outputs the s2Memeber javascript).
Now the s2Member's JS is BEFORE the other js by the theme and the slideshow is running fine...

...now I need to be shure that s2Memeber works properly...

[RESOLVED] s2Member conflict with some javascript theme

PostPosted: August 6th, 2010, 3:09 am
by stefanogaruti
I can confirm that the problem was in the theme:
it included it's own JS files BEFORE the running of wp_head() function that outputs all the other JS included in the "right" and "standard" way by WP and others plugin.

Moving all the theme's JS AFTER wp_head() solved the problem.

Some reference to this issue is here: http://codex.wordpress.org/Using_Javascript

Re: s2Member conflict with some javascript theme

PostPosted: August 17th, 2010, 1:31 pm
by Jason Caldwell
Thank you VERY much for reporting back on this topic.
~ Much appreciated.