Thread:Slyst/@comment-25523075-20150725143609/@comment-25508186-20150725152552

Your script is placed above the p tag, which is why it gets executed first. Since there are no elements with the "demo" id at the time of execution, nothing happens. You can swap positions of the script and p tags for it to work.