Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums on April 1st. BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com


Reply
itp
Contributor
Posts: 31
Registered: ‎10-01-2010
My Device: Blackberry Curve
My Carrier: Rogers

jquery hide/show not working in blackberry webworks

[ Edited ]

I am having trouble getting jquery .hide()/show() working in webworks on OS6.  Is this a known quirk?  I am able however to get similar behavior with jQuery mobile. This is my jquery test:

 

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

    $("a.submit").click( function(){        
        $("div.page").hide();
        //$("div.page").css("display", "none"); //This hides
        alert("submitted!");       
        $("div#main-menu").show();           
    });


   
    function ShowAPage(pageToShow){       
        $("div.page").hide();
        targetPage =  "div#" + pageToShow ;       
        //$(targetPage).css("display", "block"); //This shows
        $(targetPage).show();           
    }
   
});

Developer
Posts: 34
Registered: ‎07-14-2011
My Device: BlackBerry Curve 9300
My Carrier: Orange

Re: jquery hide/show not working in blackberry webworks

I'm having the same problem too. 

 

Please can anyone help us with this?

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: jquery hide/show not working in blackberry webworks

What version of JQuery are you using? Does it work with version 1.5.2?



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Highlighted
Developer
Posts: 34
Registered: ‎07-14-2011
My Device: BlackBerry Curve 9300
My Carrier: Orange

Re: jquery hide/show not working in blackberry webworks

[ Edited ]

In my case I'm using the version 1.6.2 of JQuery. I some cases the hide/show methods work fine but when I call one of them from a callback that I registered to the blackberry.system.event.onHardwareKey specifically for the BACK_KEY, the behavoir of the methods presents drawbacks rendering the divs I'm trying to display (but not for hiding the other div)

 

The problem resides mainly in the rendering of the div. I have thought in remove the div from the DOM instead of use the show/hide methods or the css display attribute. What would be the better approach?

 

Im testing in the BlackBerry Torch 9800 simulator and in a BlackBerry Curve 9300 with the BlackBerry OS 6. It's worth to say that in the BlackBerry OS 5 is working fine.