News:

Wondering if this will always be free?  See why free is better.

Main Menu

Jquery does not appear to be working?

Started by SilverKnight, October 16, 2014, 09:34:59 PM

Previous topic - Next topic

SilverKnight

So, i am attempting to install this facebook tooltips mod, such a simplistic installation it should all work however i cannot find a way to get it to work, so i did some tests and jquery does not appear to be working on my forum

Index.template.php


// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery.tipsy.js"></script>

<script type="text/javascript">
  $(function() {
    $("[title]").tipsy({fade: true, gravity: $.fn.tipsy.autoNS});
  });
</script>

<script>
function myFunction() {
    $("#h01").html("Hello jQuery")
    }
$(document).ready(myFunction);
</script>



First script function is what i want to run, 2nd one should generate text to prove if jQuery is running or not. But it's not happening.

Mod for anyone of interest: http://www.simplemachines.org/community/index.php?topic=429717.0

Kindred

What is your url?
Have you looked at the debugger to see if the JavaScript is getting Interrupted?
What other mods do you have installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SilverKnight

#2
Snip, thanks for the console heads up. Turns out it was some old javascript slider becoming too dated.

Kindred

I think that at least 2 of those mods may also load some variation of jquery... I suspect a collision.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

eyeshiv

friend check your file URL. make sure your file is on correct location.

Advertisement: