Adding jQuery to DA Skin Produces Error

Vibe

Verified User
Joined
Aug 3, 2005
Messages
124
Hi everyone,

I am finally getting around to customizing a DA skin and would like to add some jQuery functionality.

I have a fairly good feel for the process of skin design but am running into an issue that I am not familiar with (e.g. non-DA template systems don't produce this error).

When I pull up the page in Firefox (only referencing jQuery on the page - no custom code), the browser throws the following error:

*******************
Error: unterminated parenthetical
Source File: https://our.server.com:2222/HTM_JS_JQUERY
Line: 12, Column: 100
Source Code:
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/ <=== FIREFOX POINTS HERE

^[^<]*(<(.none^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;ret
*******************

I have used the following command syntax (within "files_user.conf" - root level) to reference the jQuery file:

HTM_JS_JQUERY=js/jquery-1.3.2.min.js

Then in the header/template I call the file accordingly:

<script type="text/javascript" src="/HTM_JS_JQUERY"></script>

I'm not sure if the token system has a hiccup with regard to jQuery syntax - and have searched Google only to find references to JS regular expressions.

Does anyone with experience have any insight? Any theme designers out there? :D

Thank you!
 
My apologies - I posted this to the wrong forum! Can this be moved to "Skin Programming"?
 
Thanks so much for moving the post Jeff!

For anyone that experiences issues with including jQuery in your skins - the easiest solution is to either (1) host your custom scripts from a separate domain or (2) use Google's ajax libraries within your head tags:

Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

This will fully load jQuery without any script errors. Good luck!
 
Back
Top