Load specific js & css based on class or ID?
-
Hi everyone,
I noticed that there are many tutorials on how to load specific JS & CSS for a specific page.
The problem I have is that sometimes my plug-ins load on specific posts and specific pages. I cannot have rules to define these pages or posts. Is there a way to load specific JS & CSS based on class or ID?
For example, I am using Next-Gen Gallery plugin. I want to program such that my site only loads Next-Gen’ JS and CSS only when it sees this ID in the page (ngg-album). If possible, can I use wildcard, like if the page see any ID or class starting with NGG*, load Next-Gen JS & CSS.
Thanks!
Cliff
- The topic ‘Load specific js & css based on class or ID?’ is closed to new replies.