Post by MissNK on Nov 30, 2014 11:53:21 GMT -8
David Clark, I've got the following code in my Forum Wrapper (as far as relevant) to toggle (and fix) the shoutbox:
and somewhere below that the html:
However when I remove the very first line (the link to the JQuery Library), I cant toggle the shoutbox anymore. Nothing happens when I click the toggle-button. I don't know very much of javascript / jQuery so I definitely could use some help to figure out what's happening
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script type="text/javascript" >
/* Fixed Position */
jQuery("document").ready(function($){
var nav = $('.wings');
$(window).scroll(function () {
if ($(this).scrollTop() > 0) {
nav.addClass("notflying");
} else {
nav.removeClass("notflying");
}
});
});
/* Toggle Content */
$(document).ready(function() {
$('#kings').hide();
$('#lions').click(function() {
if ($('#kings').is(':hidden')) {
$('#kings').toggle();
} else {
$('#kings').toggle();
}
return false;
});
});
</script>
and somewhere below that the html:
<div class="wings">
<div class="forshow">
<!-- Toggle Chat Image -->
<a id="lions" href="#"><img src="http://storage.proboards.com/6012808/i/YgMr1249yqlWPNMhN30l.png"/></a>
<div id="kings">
<div id="move-shoutbox"></div>
</div>
<div class="clear"></div>
</div>
</div>
However when I remove the very first line (the link to the JQuery Library), I cant toggle the shoutbox anymore. Nothing happens when I click the toggle-button. I don't know very much of javascript / jQuery so I definitely could use some help to figure out what's happening