Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using your code with minor fixes I got the following error:</p> <p><code>Uncaught TypeError: Cannot read property 'version' of undefined jquery.mcdropdown.js:78</code></p> <p>Line 78 from plugin:</p> <pre><code>var isIE6 = ($.browser.version &amp;&amp; $.browser.version &lt;= 6); </code></pre> <p>But $browser property was removed with jQuery version 1.9. See <a href="https://stackoverflow.com/questions/5889279/browser-not-defined">$browser not defined</a>.</p> <p>So, if you are using lates version of jQuery, try with some older one.</p> <p>It works with jQuery version 1.2.6. and 1.7.0. Did not test with in-between versions. For example with include:</p> <pre><code>&lt;script src="http://code.jquery.com/jquery-1.2.6.min.js"&gt;&lt;/script&gt; </code></pre> <p>It doesn't work with 1.8.3. Reports error:</p> <pre><code>Uncaught TypeError: Object function (e,t){return new v.fn.init(e,t,n)} has no method 'curCSS' jquery.mcdropdown.js:694 </code></pre> <p>With a little help from google it got the following:</p> <pre><code>$(document).ready(function (){ // dropdown reference and dropdown value var dd, val; // the option object to pass to mcDropdown // set neccessary callbacks var options = new Object(); options.select = selectHandler; options.init = initHandler; // initialize DOM element for mcDropdown $('#category').mcDropdown('#categorymenu', options); // create a reference to the dropdown // here you can set initial value function initHandler() { // get a copy of the object dd = $('#category').mcDropdown(); // dd.setValue(yourID); } // called whenever someone changes a selection on mcDropdown function selectHandler() { val = dd.getValue(); console.log(val); } }); </code></pre> <p>and in console for different selections:</p> <pre><code>"9", ""] ["12", "Education"] ["10", "Entertainment:Movies"] </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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