blackberry widget not respecting jquery hide/show

182 Views Asked by At

I am trying to use jquery with blackberry widget on a OS6 device. Widget compiler does not seem to recognize .hide() and .show() (css display properties) Is there a workaround to this?

$(document).ready(function(){ 
    $("a").click( function() 
    { 
        ShowAPage(this.id)  
    });

    function ShowAPage(pageToShow){     
        $("div.page").hide();
        targetPage =  "div#" + pageToShow ;     
        $(targetPage).show();           
    }

});
1

There are 1 best solutions below

2
On

Try this:

$("div.page").css("display", "none"); //This hides

and:

$(targetPage).css("display", "block"); //This shows

Hope this helps. Cheers