The script inside my opening if statement is working, but is the rest of this written right? I'm just want my script to run after it makes sure that a div class named single-journal-entry-wrapper is on the page.
Code:
function doit() { document.getElementsByTagName("div") for ( var x = 0; x < div.length; x++ ) { var div = div[x]; if ( div.className.indexOf("single-journal-entry-wrapper") >= 0 ) { do somethang!} } } {
Comment