In the pursuit of cleaning up templated code, I am attempting to push a third party test vendor we use into one area of our templated system.
Background: I have js on every page (all the same), js on pages that are unique to the pages, and js on each page that are unique to each 'boxed' area to be tested. Using jQuery I am able to wrap the span tags around the areas that I want 'boxed', but immediately after the there is supposed to be a <script> that runs. I can't figure out how to do this in a sequence that allows that script to run after the span tags have been placed. Anyone faced similar issues, or have any ideas on how to approach this? I'm a relative jQuery newbie, but have been using JS for a few years now. Here's the wrap code I've been using (after loading the libraries, etc): $(document).ready(function(){ $('#dr_Home').wrap('<span class="opDefaultContent" id="opmodule_adam_oliver_home_page"></span>'); }); I had hoped to chain something that would append one line of js after the </span> but I can't get it to show in user generated source code. Thanks in advance, adam_o