include javascript/jquery

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Riqi
New Member
New Member
Posts: 4
Joined: Wed Apr 03, 2013 7:52 pm

include javascript/jquery

Post by Riqi »

Hi There iam Riqi Here well i wanted to know how to include javascript code and file, css style sheet and jquery file code in a content page in cmsms i tried many times the effect is not showing so please guy please help me i really want this to develop my site,

With Regards,
Riqi
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: include javascript/jquery

Post by Wishbone »

What I would suggest is to make a simple HTML/jQuery page in an HTML file to make sure it works.

Create the exact same template and page associated with it in CMSMS. If it doesn't work, do a View Source on the page to see how it came out and compare. That should give you a clue as to what went wrong, and from there, we can figure out how to help you.

I have many sites that use jQuery in CMSMS.

One tip is to put {literal} {/literal} around your javascript, so that the template system doesn't think that your curly braces in your javascript code are tags. I'm told that this isn't necessary in Smarty3, but I continue to do so, as I have had some issues.
Riqi
New Member
New Member
Posts: 4
Joined: Wed Apr 03, 2013 7:52 pm

Re: include javascript/jquery

Post by Riqi »

Wishbone wrote:What I would suggest is to make a simple HTML/jQuery page in an HTML file to make sure it works.

Create the exact same template and page associated with it in CMSMS. If it doesn't work, do a View Source on the page to see how it came out and compare. That should give you a clue as to what went wrong, and from there, we can figure out how to help you.

I have many sites that use jQuery in CMSMS.

One tip is to put {literal} {/literal} around your javascript, so that the template system doesn't think that your curly braces in your javascript code are tags. I'm told that this isn't necessary in Smarty3, but I continue to do so, as I have had some issues.
{literal}really dont work i tried many times
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: include javascript/jquery

Post by Wishbone »

Then do a view source and tell us what's not showing up right.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: include javascript/jquery

Post by Dr.CSS »

Please give a link to the problem or show us how you try to include it...

I do:
make a folder in /uploads called js, upload script to it
call in template <head> <__script__ type="text/javascript" src='uploads/js/jqueryorjsfile.js'></__script>

Replace jqueryorjsfile with your file name...
Post Reply

Return to “The Lounge”