PDA

View Full Version : template won't save


BrettJC
08-01-2012, 01:40 AM
Hi All,

I have created a new template and have included a couple of javascript functions, i am unable to save the template which I am guessing mean's vbulletin doesn't like something in the html

I know the HTML is ok as this is the code in a .html

http://bcallaughan.net/test/home.html

I have found that is only fails to save when adding this portion of the javascript:

$('#starlink').click(function(e) {
e.preventDefault();
var data = $('#nsw').data('maphilight') || {};
data.neverOn = !data.neverOn;
$('#nsw').data('maphilight', data);
});

Can anyone see why this would be causing an issue within the template?

kh99
08-01-2012, 02:30 AM
My guess is that something's confusing it, like the curly braces or something. Try putting <vb:literal>...</vb:literal> tags around it.

BrettJC
08-01-2012, 02:39 AM
Worked a treat! thank you very much