Darren:
One thing to keep in mind is this plug-in was designed to be a new form UI
control that allows the users to type in their choices. Thus, the default
behavior when clicking in the box puts the focus in the text box so you can
begin typing.

However, you could accomplish what you want by:

* Using a <div> element instead of an <input /> element. This will make the
dropdown readonly w/no keyboard support.
* Attaching a click handler to the layer with the mcdropdown class

Example:
<div id="mcdropdown"></div>

<script type="text/javascript">
// create the drop down
$("#mcdropdown").mcDropdown("#menu");
// attach a click handler to the <div class="mcdropdown"> element
$("#mcdropdown").parent().click(function(){
// when the element is clicked on, open the menu
$("#mcdropdown").mcDropdown().openMenu();
});
</script>

I haven't tested this extensively, but it should work.

-Dan

On Fri, Jul 10, 2009 at 6:17 AM, takuhii <taku...@googlemail.com> wrote:

>
> I am using this FANTASTIC drop down plugin for jQuery, but wondered
> how I can customise it so that rather than hit the button ont he
> right, I can click the whole active area to get the dropdown to
> appear. I currently have the menu attached to a single line text box
> and would like it to open up when ever I click in the text box, or on
> the dropdown arrow?
>
> Also, how can I specify some default text in the text box that is
> acting as my dropdown launchpad?
>
> Regards
> Darren
>

Reply via email to