Instead of re-writing a massive block of code each time, I\'m trying to incorporate functions into my work but I\'m having trouble making it work.
Basically, I\'ve got a
Pass in the themeName as an argument of the switchPreview function.
-Change the first line of the function to:
jQuery.fn.switchPreview = function (themeName) {
-For each of the three times you are calling the function, make sure you are passing in the argument, i.e:
$('.liveDemoFrame').switchPreview(themeName);