I am even more confused right now.

I decided to create fake <a> outside <li> to avoid the propagation
issue.


$(document).ready(function(){

$("#menu_ma a")
        .click(function(e,a){
                        
$(this).closest("li.ui-selectee").addClass("ui-selected").siblings
().removeClass("ui-selected");
        })

$("#menu_ma li")
        .hover(
                function(){
                        $(this).addClass("ui-state-highlight cursor-pointer");
                },
                function(){
                        $(this).removeClass("ui-state-highlight 
cursor-pointer");
                })
         .click(function(e,a){
                link=$(this).find("a").attr("href");
                if(link!=undefined){
                        var link = $(this).find("a");
                        $("#fake_href")
                                .attr("href",link.attr("href"))
                                .attr("target",link.attr("target"))
                }

                $("#fake_href").click();
})
});


Function is rewriting href and target attributes and then clicks on
that fake link.
But this does not make browser behave like link was clicked. I can see
in firebug that fake link obtains proper link and target, but page is
not reloaded.

Can somebody answer why?


Brgs
Norbert

Reply via email to