title: Select2 basic example not working
body: <p>I am trying to get <code>select2</code> library working with symfony2 script. </p>
  
  <p>I am trying to implement basic example provided <a href="https://select2.github.io/examples.html" rel="nofollow">https://select2.github.io/examples.html</a> page.</p>
  
  <p>Thus I added to my page header:</p>
  
  <pre><code>&lt;!-- SELECT 2--&gt;
                              &lt;link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet" /&gt;
                              &lt;script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"&gt;&lt;/script&gt;
                              &lt;!-- /SELECT2 --&gt;
  </code></pre>
  
  <p>and following this code provided in example:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       $(document).ready(function() {
  $(".js-example-basic-single").select2();
  });
  &lt;/script&gt;
  
  &lt;select id="appbundle_items_accountdebet" name="appbundle_items[accountdebet]" class="js-example-basic-single"&gt;&lt;option value="1"&gt;001 - Środki trwałe x&lt;/option&gt;&lt;option value="2"&gt;001-001 - Środek trwały 1 &lt;/option&gt;&lt;option value="3"&gt;001-002 - Środek trwały 2 &lt;/option&gt;&lt;option value="4"&gt;002 - Kasa&lt;/option&gt;&lt;option value="7"&gt;04-33 - test&lt;/option&gt;&lt;option value="10"&gt;05 - dff&lt;/option&gt;&lt;/select&gt;
  </code></pre>
  
  <p>Unluckily it seems that I am doing something wrong as no visual changes takes place. </p>
  
  <p>Whole page code:</p>
  
  <pre><code>&lt;!-- app/Resources/views/base.html.php --&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Accounting Book's Online&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- Le styles --&gt;
  
          &lt;link href="http://localhost/symfony_learn/web/bundles/bootstrap/css/bootstrap.css" rel="stylesheet"&gt;
      &lt;style type="text/css"&gt;
        body {
          padding-top: 60px;
          padding-bottom: 40px;
        }
        .sidebar-nav {
          padding: 9px 0;
        }
  
        @media (max-width: 980px) {
          /* Enable use of floated navbar text */
          .navbar-text.pull-right {
            float: none;
            padding-left: 5px;
            padding-right: 5px;
          }
        }
      &lt;/style&gt;
  
  
      &lt;link href="http://localhost/symfony_learn/web/bundles/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"&gt;
  
      &lt;!-- HTML5 shim, for IE6-8 support of HTML5 elements --&gt;
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/html5shiv.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- Fav and touch icons --&gt;
      &lt;link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://localhost/symfony_learn/web/bundles/bootstrap/ico/apple-touch-icon-144-precomposed.png"&gt;
      &lt;link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://localhost/symfony_learn/web/bundles/bootstrap/ico/apple-touch-icon-114-precomposed.png"&gt;
        &lt;link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://localhost/symfony_learn/web/bundles/bootstrap/ico/apple-touch-icon-72-precomposed.png"&gt;
                      &lt;link rel="apple-touch-icon-precomposed" href="http://localhost/symfony_learn/web/bundles/bootstrap/ico/apple-touch-icon-57-precomposed.png"&gt;
                                     &lt;link rel="shortcut icon" href="http://localhost/symfony_learn/web/bundles/bootstrap/ico/favicon.png"&gt;
  
                              &lt;!-- SELECT 2--&gt;
                              &lt;script src="//code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
                              &lt;link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet" /&gt;
                              &lt;script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"&gt;&lt;/script&gt;
                              &lt;!-- /SELECT2 --&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
  
  
  &lt;!-- Kod tymczasowy --&gt;
  &lt;!-- /Kod tymczasowy --&gt;
  
      &lt;div class="navbar navbar-inverse navbar-top"&gt; &lt;!-- navbar-fixed-top --&gt;
        &lt;div class="navbar-inner"&gt;
          &lt;div class="container-fluid"&gt;
            &lt;button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
            &lt;/button&gt;
            &lt;a class="brand" href="#"&gt;Accounting Book's Online&lt;/a&gt;
            &lt;div class="nav-collapse collapse"&gt;
              &lt;p class="navbar-text pull-right"&gt;
                          &lt;p&gt;Username: Abdel&lt;/p&gt;
                          &lt;/p&gt;
              &lt;ul class="nav"&gt;
                &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="/symfony_learn/web/app_dev.php/app/static/help"&gt;Help&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="/symfony_learn/web/app_dev.php/app/static/software"&gt;Software&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="container-fluid"&gt;
        &lt;div class="row-fluid"&gt;
          &lt;div class="span3"&gt;
            &lt;div class="well sidebar-nav"&gt;
              &lt;ul class="nav nav-list"&gt;
                &lt;li class="nav-header"&gt;Actions&lt;/li&gt;
                &lt;li &gt;&lt;a href="/symfony_learn/web/app_dev.php/app/accounts/"&gt;Accounts&lt;/a&gt;&lt;/li&gt;
                &lt;li &gt;&lt;a href="/symfony_learn/web/app_dev.php/app/listbooks/"&gt;Books&lt;/a&gt;&lt;/li&gt;
                &lt;li &gt;&lt;a href="/symfony_learn/web/app_dev.php/app/documents/"&gt;Documents&lt;/a&gt;&lt;/li&gt;
                &lt;li class="nav-header"&gt;Reports&lt;/li&gt;
                &lt;li &gt;&lt;a href="/symfony_learn/web/app_dev.php/app/accounts/reportsums"&gt;Accounts values&lt;/a&gt;
              &lt;/ul&gt;
            &lt;/div&gt;&lt;!--/.well --&gt;
                     &lt;div class="well sidebar-nav"&gt;
              &lt;ul class="nav nav-list"&gt;
                &lt;li class="nav-header"&gt;Name of entity&lt;/li&gt;
                Test &lt;A HREF="/symfony_learn/web/app_dev.php/app/listbooks/"&gt;[Change]&lt;/A&gt;
                &lt;/ul&gt;
                &lt;/div&gt; &lt;!--/.well --&gt;
  
  
          &lt;/div&gt;&lt;!--/span--&gt;
          &lt;div class="span9"&gt;
            &lt;div class="hero-unit"&gt;
              &lt;p&gt;      &lt;B&gt;Item&lt;/B&gt;&lt;BR&gt;
  
  
  &lt;form name="appbundle_items" method="post" action=""&gt;
   &lt;SCRIPT type="text/javascript"&gt;
       $(document).ready(function() {
  $("js-example-basic-single").select2();
  });
  &lt;/SCRIPT&gt;
  
  &lt;div id="appbundle_items"&gt;&lt;div&gt;                &lt;label for="appbundle_items_marker" class="required"&gt;Marker&lt;/label&gt;&lt;input type="text" id="appbundle_items_marker" name="appbundle_items[marker]" required="required" maxlength="220" /&gt;&lt;/div&gt;&lt;div&gt;                &lt;label class="required"&gt;Itemdate&lt;/label&gt;&lt;div id="appbundle_items_itemdate" maxlength="220"&gt;&lt;select id="appbundle_items_itemdate_month" name="appbundle_items[itemdate][month]"&gt;&lt;option value="1"&gt;Jan&lt;/option&gt;&lt;option value="2"&gt;Feb&lt;/option&gt;&lt;option value="3"&gt;Mar&lt;/option&gt;&lt;option value="4"&gt;Apr&lt;/option&gt;&lt;option value="5"&gt;May&lt;/option&gt;&lt;option value="6"&gt;Jun&lt;/option&gt;&lt;option value="7"&gt;Jul&lt;/option&gt;&lt;option value="8"&gt;Aug&lt;/option&gt;&lt;option value="9"&gt;Sep&lt;/option&gt;&lt;option value="10"&gt;Oct&lt;/option&gt;&lt;option value="11"&gt;Nov&lt;/option&gt;&lt;option value="12"&gt;Dec&lt;/option&gt;&lt;/select&gt;&lt;select id="appbundle_items_itemdate_day" name="appbundle_items[itemdate][day]"&gt;&lt;option value="1"&gt;1&lt;/option&gt;&lt;option value="2"&gt;2&lt;/option&gt;&lt;option value="3"&gt;3&lt;/option&gt;&lt;option value="4"&gt;4&lt;/option&gt;&lt;option value="5"&gt;5&lt;/option&gt;&lt;option value="6"&gt;6&lt;/option&gt;&lt;option value="7"&gt;7&lt;/option&gt;&lt;option value="8"&gt;8&lt;/option&gt;&lt;option value="9"&gt;9&lt;/option&gt;&lt;option value="10"&gt;10&lt;/option&gt;&lt;option value="11"&gt;11&lt;/option&gt;&lt;option value="12"&gt;12&lt;/option&gt;&lt;option value="13"&gt;13&lt;/option&gt;&lt;option value="14"&gt;14&lt;/option&gt;&lt;option value="15"&gt;15&lt;/option&gt;&lt;option value="16"&gt;16&lt;/option&gt;&lt;option value="17"&gt;17&lt;/option&gt;&lt;option value="18"&gt;18&lt;/option&gt;&lt;option value="19"&gt;19&lt;/option&gt;&lt;option value="20"&gt;20&lt;/option&gt;&lt;option value="21"&gt;21&lt;/option&gt;&lt;option value="22"&gt;22&lt;/option&gt;&lt;option value="23"&gt;23&lt;/option&gt;&lt;option value="24"&gt;24&lt;/option&gt;&lt;option value="25"&gt;25&lt;/option&gt;&lt;option value="26"&gt;26&lt;/option&gt;&lt;option value="27"&gt;27&lt;/option&gt;&lt;option value="28"&gt;28&lt;/option&gt;&lt;option value="29"&gt;29&lt;/option&gt;&lt;option value="30"&gt;30&lt;/option&gt;&lt;option value="31"&gt;31&lt;/option&gt;&lt;/select&gt;&lt;select id="appbundle_items_itemdate_year" name="appbundle_items[itemdate][year]"&gt;&lt;option value="2010"&gt;2010&lt;/option&gt;&lt;option value="2011"&gt;2011&lt;/option&gt;&lt;option value="2012"&gt;2012&lt;/option&gt;&lt;option value="2013"&gt;2013&lt;/option&gt;&lt;option value="2014"&gt;2014&lt;/option&gt;&lt;option value="2015"&gt;2015&lt;/option&gt;&lt;option value="2016"&gt;2016&lt;/option&gt;&lt;option value="2017"&gt;2017&lt;/option&gt;&lt;option value="2018"&gt;2018&lt;/option&gt;&lt;option value="2019"&gt;2019&lt;/option&gt;&lt;option value="2020"&gt;2020&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;                &lt;label for="appbundle_items_itemvalue" class="required"&gt;Itemvalue&lt;/label&gt;&lt;input type="text" id="appbundle_items_itemvalue" name="appbundle_items[itemvalue]" required="required" /&gt;&lt;/div&gt;&lt;div&gt;                &lt;label for="appbundle_items_accountdebet" class="required"&gt;Accountdebet&lt;/label&gt;&lt;select id="appbundle_items_accountdebet" name="appbundle_items[accountdebet]" class="js-example-basic-single"&gt;&lt;option value="1"&gt;001 - Środki trwałe x&lt;/option&gt;&lt;option value="2"&gt;001-001 - Środek trwały 1 &lt;/option&gt;&lt;option value="3"&gt;001-002 - Środek trwały 2 &lt;/option&gt;&lt;option value="4"&gt;002 - Kasa&lt;/option&gt;&lt;option value="7"&gt;04-33 - test&lt;/option&gt;&lt;option value="10"&gt;05 - dff&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;&lt;div&gt;                &lt;label for="appbundle_items_accountcredit" class="required"&gt;Accountcredit&lt;/label&gt;&lt;select id="appbundle_items_accountcredit" name="appbundle_items[accountcredit]" class="js-example-basic-single"&gt;&lt;option value="1"&gt;001 - Środki trwałe x&lt;/option&gt;&lt;option value="2"&gt;001-001 - Środek trwały 1 &lt;/option&gt;&lt;option value="3"&gt;001-002 - Środek trwały 2 &lt;/option&gt;&lt;option value="4"&gt;002 - Kasa&lt;/option&gt;&lt;option value="7"&gt;04-33 - test&lt;/option&gt;&lt;option value="10"&gt;05 - dff&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;&lt;div&gt;&lt;button type="submit" id="appbundle_items_save" name="appbundle_items[save]"&gt;Add item&lt;/button&gt;&lt;/div&gt;&lt;input type="hidden" id="appbundle_items__token" name="appbundle_items[_token]" value="uc4gtvak7M-3gc4HsIuVlr0EpcycuctUGPJu_kAI7c8" /&gt;&lt;/div&gt;
  &lt;/form&gt;
  
    &lt;/p&gt;
            &lt;/div&gt;
  
          &lt;/div&gt;&lt;!--/span--&gt;
        &lt;/div&gt;&lt;!--/row--&gt;
  
        &lt;hr&gt;
  
        &lt;footer&gt;
          &lt;p&gt;&amp;copy; Investment Opportunities Sp. z o.o. 2015&lt;/p&gt;
        &lt;/footer&gt;
  
      &lt;/div&gt;&lt;!--/.fluid-container--&gt;
  
      &lt;!-- Le javascript
      ================================================== --&gt;
      &lt;!-- Placed at the end of the document so the pages load faster --&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/jquery.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-transition.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-alert.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-modal.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-dropdown.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-scrollspy.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-tab.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-tooltip.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-popover.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-button.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-collapse.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-carousel.js"&gt;&lt;/script&gt;
      &lt;script src="http://localhost/symfony_learn/web/bundles/bootstrap/js/bootstrap-typeahead.js"&gt;&lt;/script&gt;
  
  
  &lt;div id="sfwdt3909dd" class="sf-toolbar" style="display: none"&gt;&lt;/div&gt;&lt;script&gt;/*&lt;![CDATA[*/    Sfjs = (function() {        "use strict";        var noop = function() {},            collectionToArray = function (collection) {                var length = collection.length || 0,                    results = new Array(length);                while (length--) {                    results[length] = collection[length];                }                return results;            },            profilerStorageKey = 'sf2/profiler/',            request = function(url, onSuccess, onError, payload, options) {                var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');                options = options || {};                options.maxTries = options.maxTries || 0;                xhr.open(options.method || 'GET', url, true);                xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');                xhr.onreadystatechange = function(state) {                    if (4 !== xhr.readyState) {                        return null;                    }                    if (xhr.status == 404 &amp;&amp; options.maxTries &gt; 1) {                        setTimeout(function(){                            options.maxTries--;                            request(url, onSuccess, onError, payload, options);                        }, 500);                        return null;                    }                    if (200 === xhr.status) {                        (onSuccess || noop)(xhr);                    } else {                        (onError || noop)(xhr);                    }                };                xhr.send(payload || '');            },            hasClass = function(el, klass) {                return el.className &amp;&amp; el.className.match(new RegExp('\\b' + klass + '\\b'));            },            removeClass = function(el, klass) {                if (el.className) {                    el.className = el.className.replace(new RegExp('\\b' + klass + '\\b'), ' ');                }            },            addClass = function(el, klass) {                if (!hasClass(el, klass)) {                    el.className += " " + klass;                }            },            getPreference = function(name) {                if (!window.localStorage) {                    return null;                }                return localStorage.getItem(profilerStorageKey + name);            },            setPreference = function(name, value) {                if (!window.localStorage) {                    return null;                }                localStorage.setItem(profilerStorageKey + name, value);            },            requestStack = [],            renderAjaxRequests = function() {                var requestCounter = document.querySelectorAll('.sf-toolbar-ajax-requests');                if (!requestCounter.length) {                    return;                }                var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list');                var state = 'ok';                if (tbodies.length) {                    var tbody = tbodies[0];                    var rows = document.createDocumentFragment();                    if (requestStack.length) {                        for (var i = 0; i &lt; requestStack.length; i++) {                            var request = requestStack[i];                            var row = document.createElement('tr');                            rows.appendChild(row);                            var methodCell = document.createElement('td');                            methodCell.textContent = request.method;                            row.appendChild(methodCell);                            var pathCell = document.createElement('td');                            pathCell.className = 'sf-ajax-request-url';                            pathCell.textContent = request.url;                            pathCell.setAttribute('title', request.url);                            row.appendChild(pathCell);                            var durationCell = document.createElement('td');                            durationCell.className = 'sf-ajax-request-duration';                            if (request.duration) {                                durationCell.textContent = request.duration + "ms";                            } else {                                durationCell.textContent = '-';                            }                            row.appendChild(durationCell);                            row.appendChild(document.createTextNode(' '));                            var profilerCell = document.createElement('td');                            if (request.profilerUrl) {                                var profilerLink = document.createElement('a');                                profilerLink.setAttribute('href', request.profilerUrl);                                profilerLink.textContent = request.profile;                                profilerCell.appendChild(profilerLink);                            } else {                                profilerCell.textContent = 'n/a';                            }                            row.appendChild(profilerCell);                            var requestState = 'ok';                            if (request.error) {                                requestState = 'error';                                if (state != "loading" &amp;&amp; i &gt; requestStack.length - 4) {                                    state = 'error';                                }                            } else if (request.loading) {                                requestState = 'loading';                                state = 'loading';                            }                            row.className = 'sf-ajax-request sf-ajax-request-' + requestState;                        }                        var infoSpan = document.querySelectorAll(".sf-toolbar-ajax-info")[0];                        var children = collectionToArray(tbody.children);                        for (var i = 0; i &lt; children.length; i++) {                            tbody.removeChild(children[i]);                        }                        tbody.appendChild(rows);                        if (infoSpan) {                            var text = requestStack.length + ' call' + (requestStack.length &gt; 1 ? 's' : '');                            infoSpan.textContent = text;                        }                    } else {                        var cell = document.createElement('td');                        cell.setAttribute('colspan', '4');                        cell.textContent = "No AJAX requests yet.";                        var row = document.createElement('tr');                        row.appendChild(cell);                        tbody.appendChild(row);                    }                }                requestCounter[0].textContent = requestStack.length;                var className = 'sf-toolbar-ajax-requests sf-toolbar-status';                if (state == 'ok') {                    className += ' sf-toolbar-status-green';                } else if (state == 'error') {                    className += ' sf-toolbar-status-red';                } else {                    className += ' sf-ajax-request-loading';                }                requestCounter[0].className = className;            };        var addEventListener;        var el = document.createElement('div');        if (!'addEventListener' in el) {            addEventListener = function (element, eventName, callback) {                element.attachEvent('on' + eventName, callback);            };        } else {            addEventListener = function (element, eventName, callback) {                element.addEventListener(eventName, callback, false);            };        }                    if (window.XMLHttpRequest &amp;&amp; XMLHttpRequest.prototype.addEventListener) {                var proxied = XMLHttpRequest.prototype.open;                XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {                    var self = this;                    /* prevent logging AJAX calls to static and inline files, like templates */                    var path = url;                    if (url.substr(0, 1) === '/') {                        if (0 === url.indexOf('\x2Fsymfony_learn\x2Fweb')) {                            path = url.substr(18);                        }                    }                    else if (0 === url.indexOf('http\x3A\x2F\x2Flocalhost\x2Fsymfony_learn\x2Fweb')) {                        path = url.substr(34);                    }                    if (path.substr(0, 1) === '/' &amp;&amp; !path.match(new RegExp("^\/(app(_[\\w]+)?\\.php\/)?_wdt"))) {                        var stackElement = {                            loading: true,                            error: false,                            url: url,                            method: method,                            start: new Date()                        };                        requestStack.push(stackElement);                        this.addEventListener('readystatechange', function() {                            if (self.readyState == 4) {                                stackElement.duration = new Date() - stackElement.start;                                stackElement.loading = false;                                stackElement.error = self.status &lt; 200 || self.status &gt;= 400;                                stackElement.profile = self.getResponseHeader("X-Debug-Token");                                stackElement.profilerUrl = self.getResponseHeader("X-Debug-Token-Link");                                Sfjs.renderAjaxRequests();                            }                        }, false);                        Sfjs.renderAjaxRequests();                    }                    proxied.apply(this, Array.prototype.slice.call(arguments));                };            }                return {            hasClass: hasClass,            removeClass: removeClass,            addClass: addClass,            getPreference: getPreference,            setPreference: setPreference,            addEventListener: addEventListener,            request: request,            renderAjaxRequests: renderAjaxRequests,            load: function(selector, url, onSuccess, onError, options) {                var el = document.getElementById(selector);                if (el &amp;&amp; el.getAttribute('data-sfurl') !== url) {                    request(                        url,                        function(xhr) {                            el.innerHTML = xhr.responseText;                            el.setAttribute('data-sfurl', url);                            removeClass(el, 'loading');                            (onSuccess || noop)(xhr, el);                        },                        function(xhr) { (onError || noop)(xhr, el); },                        '',                        options                    );                }                return this;            },            toggle: function(selector, elOn, elOff) {                var tmp = elOn.style.display,                    el = document.getElementById(selector);                elOn.style.display = elOff.style.display;                elOff.style.display = tmp;                if (el) {                    el.style.display = 'none' === tmp ? 'none' : 'block';                }                return this;            }        }    })();/*]]&gt;*/&lt;/script&gt;&lt;script&gt;/*&lt;![CDATA[*/    (function () {                Sfjs.load(            'sfwdt3909dd',            '/symfony_learn/web/app_dev.php/_wdt/3909dd',            function(xhr, el) {                el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';                if (el.style.display == 'none') {                    return;                }                if (Sfjs.getPreference('toolbar/displayState') == 'none') {                    document.getElementById('sfToolbarMainContent-3909dd').style.display = 'none';                    document.getElementById('sfToolbarClearer-3909dd').style.display = 'none';                    document.getElementById('sfMiniToolbar-3909dd').style.display = 'block';                } else {                    document.getElementById('sfToolbarMainContent-3909dd').style.display = 'block';                    document.getElementById('sfToolbarClearer-3909dd').style.display = 'block';                    document.getElementById('sfMiniToolbar-3909dd').style.display = 'none';                }                Sfjs.renderAjaxRequests();                /* Handle toolbar-info position */                var toolbarBlocks = document.querySelectorAll('.sf-toolbar-block');                for (var i = 0; i &lt; toolbarBlocks.length; i += 1) {                    toolbarBlocks[i].onmouseover = function () {                        var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0];                        var pageWidth = document.body.clientWidth;                        var elementWidth = toolbarInfo.offsetWidth;                        var leftValue = (elementWidth + this.offsetLeft) - pageWidth;                        var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;                        /* Reset right and left value, useful on window resize */                        toolbarInfo.style.right = '';                        toolbarInfo.style.left = '';                        if (leftValue &gt; 0 &amp;&amp; rightValue &gt; 0) {                            toolbarInfo.style.right = (rightValue * -1) + 'px';                        } else if (leftValue &lt; 0) {                            toolbarInfo.style.left = 0;                        } else {                            toolbarInfo.style.right = '-1px';                        }                    };                }            },            function(xhr) {                if (xhr.status !== 0) {                    confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') &amp;&amp; (window.location = '/symfony_learn/web/app_dev.php/_profiler/3909dd');                }            },            {'maxTries': 5}        );    })();/*]]&gt;*/&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>