Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error using smothmenu "$(#menu).smothmenu is not a function #5

Open
fayazaziz opened this issue Oct 21, 2011 · 3 comments
Open

error using smothmenu "$(#menu).smothmenu is not a function #5

fayazaziz opened this issue Oct 21, 2011 · 3 comments

Comments

@fayazaziz
Copy link

I recently use this plugin in my website which use jquery ui (1.6.2+ and ui 1.8+ version)
when i use this plugin in a septate solution..its work perfect

but

when i include these in my existing page (which is in the master page) so its show working here is my files that i m using

VerticalMenu.css" (css given in this plugin)
dot-luv/jquery-ui-1.8.15.custom.css" (ui css)
jquery-1.6.2.min.js" (core)
jquery-ui-1.8.15.custom.min.js" (ui)
jquery.ui.smoothMenu.js" (include in this plugin)
jquery.placeholder.js" (another plugin which is working)

and my script
calling from ajax (working fine)
success: function (msg) {
var content = msg.d;
alert(content);
$("ul[id$=smooth_menu_1]").hide();
$("ul[id$=smooth_menu_1]").html(content);
$('#smooth_menu_1 > li').smoothMenu({ direction: 'vertical', zIndex: 10, icon: false });
$("ul[id$=smooth_menu_1]").show();

my markup

    (data will be fill from code behind)

i need solution....................there is no issue of master page since master page excute on the server side and our web on the browser (client side).............. i also use $.noconfilt but nothing working on my way...................need help !

@madogai
Copy link
Owner

madogai commented Oct 21, 2011

I've been using in smoothMenu jQuery1.6.4, it is running.

try this.
$('ul#smooth_menu_1').hide();
$('ul#smooth_menu_1').html(content);
$('ul#smooth_menu_1 > li').smoothMenu({ direction: 'vertical', zIndex: 10, icon: false });
$('ul#smooth_menu_1').show();

better code.
var $list = $('ul#smooth_menu_1');
$list.hide().html(content);
$('ul#smooth_menu_1 > li').smoothMenu({ direction: 'vertical', zIndex: 10, icon: false });
$list.show();

@fayazaziz
Copy link
Author

somehow i resolve the issue using $.noconflct.......its wokring fine for me for only 2 days... now when i open the page i gives me exception (e.message = 'undefined')
without any reason since i selection is working fine and in console... when i code this. it give me 1 as return
$("ul[id$=smooth_menu_1]").length
...
what is wrong any idea guyz?

@fayazaziz
Copy link
Author

try {

        $("ul[id$=smooth_menu_1] > li").smoothMenu({ direction: 'vertical', zIndex: 10, icon: false });
    }
    catch (err) {
        alert("error in menu : " + err.Message);
    }
    finally {

        $("ul[id$=smooth_menu_1]").show();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants