unterminated string literal
<p>Yet again, another one of these errors.. </p>

<p>I've tried searching around to get this resolved before asking, but couldn't find anything that would fix this issue. </p>

<p>So I've got:(<strong>Updated</strong>)</p>

<pre><code>&lt;script type="text/javascript"&gt; 
    $(function(){
        $('.episodes').live('click',function(){
            var id = $(this).attr('id').replace('episode_',''),
            width = 730,
            height = 645;

            if(id == 3){
                width = 635;
                height = 790;
            }                   

            ColdFusion.Window.create('Episode_'+id,'','/landing_pages/superhero/episode'+id+'.cfm',{width:width,height:height,center:true,draggable:false,resizable:false,modal:true});
        });
    });
&lt;/script&gt;
</code></pre>

<p>I've tried escaping the <strong>"text\/javascript"</strong> and the <strong>&lt;\/script></strong>, but it'll either not work at all and not show the error anymore because it won't recognize it as a javascript statement or it will continue to throw the error. </p>

<p>Firebug is saying the problem is: <code>var id = $(this).attr('id').replace('episode_',''),</code>, but I'm not seeing where that could be a problem. </p>

<p>I was considering escaping the <strong>/</strong> in the create method at the bottom, but I wouldn't think it'd make a difference because it's showing the error is at the top. </p>

<p>Thanks!</p>

<p><strong>(Update)</strong>
I've tried all of the answers with the semi-colon issue, and it didn't work. Didn't impact it whatsoever. Any other ideas?</p>

<p>I'm actually pasting this into a CMS and it's going through SQL and then outputting it in my article. I don't see why it would cause a problem, but I guess it's another thing to consider. </p>

<p><strong>UPDATED WITH FIX</strong>
The error was the use of the single quotes. Had to change all of the single quotes to a double quote. Apparently that's something you've got to do when you're inserting it into the DB. </p>

<p>Final code is:</p>

<pre><code>&lt;script type="text/javascript"&gt; 
    $(function(){
        $(".episodes").live("click",function(){
            var id = $(this).attr("id").replace("episode_",""),
            width = 730,
            height = 645;

            if(id == 3){
                width = 635;
                height = 790;
            }                   

            ColdFusion.Window.create("Episode_"+id,"","/landing_pages/superhero/episode"+id+".cfm",{width:width,height:height,center:true,draggable:false,resizable:false,modal:true});
        });
    });
&lt;/script&gt;
</code></pre>
