WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress adds line break in javascript (1 post)

  1. Timothy Jacobs
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic