2012-09-09, 03:12 PM
2012-09-09, 03:13 PM
The same way as you would in any other template.
2012-09-09, 03:15 PM
Which is what?
Do I need to use "jQuery" instead of "$" ?
Before my actual script I use;
So my script is like this
Still a no go
----------------------------------------------------------------------------
Also my headerinclude, includes this at the bottom;
Do I need template conditionals plugin or the php in templates plugin?
Do I need to use "jQuery" instead of "$" ?
Before my actual script I use;
<script src="http://code.jquery.com/jquery-latest.js">jQuery.noConflict();</script>
So my script is like this
<script src="http://code.jquery.com/jquery-latest.js">jQuery.noConflict();</script>
<script>
blah blah blah
</script>
Still a no go
----------------------------------------------------------------------------
Also my headerinclude, includes this at the bottom;
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
jQuery.noConflict();
</script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
jQuery.noConflict();
</script>
<script type="text/javascript">
jQuery.noConflict();
</script>
Do I need template conditionals plugin or the php in templates plugin?
2012-09-09, 04:16 PM
Sorry @FooFighter I don't quite get your problem...
2012-09-09, 04:17 PM
Use this instead of the messy one in headerinclude
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
jQuery.noConflict();
</script>
2012-09-09, 09:41 PM
Still nothing, I can get it to work flawlessly in a pagemanger page, with "mybb templates set to no" but in my index template it doesn't take my jquery code.
So do I need template conditionals to run jquery scripts in templates? or even php in templates mod?
So do I need template conditionals to run jquery scripts in templates? or even php in templates mod?
2012-09-10, 09:57 AM
(2012-09-09, 09:41 PM)FooFighter Wrote: [ -> ]Still nothing, I can get it to work flawlessly in a pagemanger page, with "mybb templates set to no" but in my index template it doesn't take my jquery code.
So do I need template conditionals to run jquery scripts in templates? or even php in templates mod?
What is the problem mate? It is so simple to include jquery.... IF you mean your other javascripts are not working then please post your Headerinclude template.
2012-09-10, 12:18 PM
Maybe try to put your Jquery code into the tags like Yaldaram showed:
http://yaldaram.com/thread-40.html
Always use that seems to work well so.
http://yaldaram.com/thread-40.html
<script type="text/javascript">
jQuery.noConflict();
jQuery(function($) {
// Your ! jQuery Code goes on this line
});
</script>
Always use that seems to work well so.
2012-09-10, 01:17 PM
Exactly. Standard jQuery functions come as :
$.(function() {
.
.
});
All you have to do is change the line:
$.(function() {
to
jQuery(function($) {
and add this line before that:
jQuery.noConflict();
rest will remain same.
$.(function() {
.
.
});
All you have to do is change the line:
$.(function() {
to
jQuery(function($) {
and add this line before that:
jQuery.noConflict();
rest will remain same.