Hi - I'd like to add specific jQuery code to the end of the body tag of my main layout, but not for every page template. In this case it is code for a revolution slider on the homepage, but not needed on other sub pages. Not sure if this is possible... but can't figure out how to do it! Thanks for any assistance. Steve
Sebastiaan Works like a charm. Thanks for answering for what I now understand is not specific to Umbraco but rather a general razor/MVC question. Once understood, I also found this post at stack overflow very helpful for integrating with partial views. Steve
Add JS to end of <body> from a partial view
Hi - I'd like to add specific jQuery code to the end of the body tag of my main layout, but not for every page template. In this case it is code for a revolution slider on the homepage, but not needed on other sub pages.
Not sure if this is possible... but can't figure out how to do it!
Thanks for any assistance.
Steve
In your main layout add the following where you want the JS code to be inserted:
On each of the views where you want to add some scripts to the page, you can now implement that section:
Sebastiaan
Works like a charm.
Thanks for answering for what I now understand is not specific to Umbraco but rather a general razor/MVC question.
Once understood, I also found this post at stack overflow very helpful for integrating with partial views.
Steve
is working on a reply...