Support » Plugins » Hacks » WordPress adds line break in javascript

  • Resolved Timothy Jacobs

    (@timothyblynjacobs)


    This

    <script type="text/javascript">// <![CDATA[
    jQuery(".span7").append('<div class="span2"></div>');
    jQuery(".span7").removeClass("span7").addClass("span5");
    // ]]></script>

    goes to this

    <script type="text/javascript">// <![CDATA[
    jQuery(".span7").append('
    
    <div class="span2"></div>
    
    ');
    jQuery(".span7").removeClass("span7").addClass("span5");
    // ]]></script>

    And then it doesn’t work. Ideas?

  • The topic ‘WordPress adds line break in javascript’ is closed to new replies.