If it worked then I would first check the paths to your javascript/css files. They might have changed during the move. Either domain name or the dir structure. But that is what the error seems to be . Missing js or css files
I checked it and paths are ok.
Hi,
Try to pull this like in js file, just to test Jquery calls:
$(document).ready(function() {
$('.title').append("<a href='#'>SAUSAGES</a>")
}
While title is any class in your template.
It will probably make your website ugly, though,
Ok i will do it later because a lot of people read this website so i can’t test it now.
Do i have to put it in the header.php in <script> tags?
It’s the fastest way yes, to put in header.php inside standard javascript tags:
<style type="text/javascript">
$(document).ready(function() {
$('.title').append("<a href='#'>SAUSAGES</a>")
}
</style>
To work, TITLE must be an existing CSS class in your template. You can also try with h2 for example:
<style type="text/javascript">
$(document).ready(function() {
$(h2).append("<a href='#'>SAUSAGES</a>")
}
</style>
If Jquery works, it will add the text link sausages to that class everywhere – so maybe not a good idea if many people visit your site now.
Ok, i put the code inside and i saw in every h2 text SAUSAGES
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Just a note from someone passing through, doesn’t this:
$(h2)
need to be this:
$('h2')
?
Yes, I did it, because I saw this problem in console so everything was alright.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
So $('.title') cannot be found?
No…
I checked only:
<script type="text/javascript">
$(document).ready(function() {
$('h2').append("<a href='#'>SAUSAGES</a>")
}
</script>
And I saw near all h2 word SAUSAGES
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Oh sorry I got mixed up with sausages! You are trying to get jQuery tabs working but you are having issues, yeah? Can you show us a page with the problem?
It’s in wordpress admin page problem.
I dont’s see any widgets because in console i have this error.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What’s the full errors you’re getting in the console? Including file names please π
Uncaught TypeError: jQuery(…).tabs is not a function scripts.js?ver=1:31(anonymous function)
In scripts.js it looks:
// tab switcher
jQuery( "#tabs" ).tabs({
activate: function (e, ui) {
jQuery.cookie('selected-tab', ui.newTab.index(), { path: '/', expires: 1 });
},
active: jQuery.cookie('selected-tab')
});
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Does jQuery exist in your console after your page has loaded?