Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap- Create default "Please Choose Page" dropdown option
    primarykey
    data
    text
    <p>I'm using a bootstrap template and would like a default "Please Choose Page" item to appear in the drop down menu when the menu adjusts for tablet and smartphone viewing. As far as I can tell, the existing script relating to the drop down is:</p> <pre><code> $cjq(".dropdown").hover( function () { $cjq(this).addClass("open"); }, function () { $cjq(this).removeClass("open"); } ); $cjq("&lt;select /&gt;").appendTo(".buttons-container"); $cjq(".buttons-container select").addClass('nav-select'); $cjq(".nav-collapse a").each(function() { var el = $cjq(this); if (el.parent().hasClass("active")){ $cjq("&lt;option /&gt;", { "selected": "selected", "value" : el.attr("href"), "text" : el.html().replace(/&lt;i&gt;.*&lt;\/i&gt;/gi,'') }).appendTo(".buttons-container select"); } else { $cjq("&lt;option /&gt;", { "value" : el.attr("href"), "text" : el.html().replace(/&lt;i&gt;.*&lt;\/i&gt;/gi,'') }).appendTo(".buttons-container select"); } }); $cjq(".buttons-container select").change(function() { window.location = $cjq(this).find("option:selected").val(); }); </code></pre> <p>I've tried integrating the following, but I'm not really familiar with javascript and cannot get it working: </p> <pre><code> $("&lt;option /&gt;", { "selected": "selected", "value" : "", "text" : "Please choose page" }).appendTo(".buttons-container select"); </code></pre> <p>The development page <a href="http://www.asam.edu.au/2013/" rel="nofollow">can be viewed here.</a></p> <p>If anyone has any pointers I'd really appreciate it!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload