I want to run a js/jQuery script that hides elements of a certain class on certain wordpress pages. Hiding them works when typing it into the console:
jQuery('div.pretty > long > selector').hide()
The script looks something like this:
jQuery(document).ready(function($){
$('div.pretty > long > selector').hide(0, console.log('hidden!'))
})
It seems to execute since I get the console log callback, but the elements are not hidden.
I also tried the following, but with the same result:
jQuery(document).ready(function(){
jQuery('div.pretty > long > selector').hide(0, console.log('hidden!'))
})
Any hints on how to fix this are very much appreciated!