Ask questions and get good answers on mb.jQuery.components

Hi Matteo,

it seems there's a problem when an input text field is placed inside a mbMenu item. I cannot retrieve its value with $("#inputid").val(), can you confirm this ?

This is evident even in your demo.html page inside mbMenu 2.8.5, if you write something into the input field "you can have input inside" under Menu 3 (aprox at line 208), jquery .val() always returns "you can have input inside", and not the updated content

Unfortunatly, that's a major bug for me

Thank you for your work, Roberto

asked Jan 09 '11 at 13:19

robs's gravatar image

robs
132


Hi Roberto, Yes, if you point to the ID of an element inside a menu you'll not retrive the element of the menu because the menu displayed is a clone of the one defined in the HTML dome. To obtain the element of the displayed menu just add the "mb_" prefix to the menu ID. For example, in your case, to retrive the value of the input element in the displayed menu with ID "menu_3": $("#mb_menu_3 #myInput").val().

Hope this can help you to solve your issue,

Matteo

answered Jan 10 '11 at 13:52

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Great, have to look if I have problems with ui tabs inside a mbmenu, but I will open another bug If I cannot figure it out

Thank you, Roberto

answered Jan 12 '11 at 07:12

robs's gravatar image

robs
132

Your answer
toggle preview

jQuery main site - Matteo Bicocchi