×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Exclamation jQuery show() and hide() do not work on device.

    I am using jQuery's show() and hide() methods in my widget. Everything works fine on the S60 emulator (S60 Dev Tools 3rd Ed FP2 SDK) but not when testing on a Nokia E66.

    Am I missing something?

    Is this a version problem with something on the device?

    Any help is appreciated.

    Christian

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: jQuery show() and hide() do not work on device.

    Hi Christian,

    I've tested both jQuery hide() and show() methods on a Nokia E66, and they seem to correctly work.

    Have you tried debugging your code, to check if there is some other problem with it?
    Also, you could try posting your code here, so that It'll be possible to test and check it

    Pit

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Re: jQuery show() and hide() do not work on device.

    Hi Jappit,

    The reason I am assuming there is some bug is that it works fine on the emulator and if I replace the hide() and show() calls on my widget with:

    Code:
    $(e).css("display","none");
    
    $(e).css("display","block");
    respectively, it works fine on the device as well.

    The code is pretty straightfoward, but there might be some interaction of things I guess.

    Christian

  4. #4
    Nokia Developer Champion
    Join Date
    Aug 2006
    Posts
    17

    Re: jQuery show() and hide() do not work on device.

    Hi Christian,

    The hide and show just don't work or your widget crashes?
    I'm asking this because I had a problem with DIVs with the property "display: none" and when I tried to use hide or show my widget just exited.

    So, all my divs has "display: block" and I made a function to hide all divs with a specific class (like "view"), and so I manipulate it as I want it.

    []s
    Neto

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: jQuery show() and hide() do not work on device.

    Hi Christian,

    the following is a code working fine on my E66, maybe you could try to test it and post your results:
    HTML snippet:
    Code:
    <body onLoad="javascript:init();">
    	<div id="myElement">Hello Widgets!</div>
    </body>
    JS code:
    Code:
    function init()
    {
    	$('#myElement').hide('slow');
    }
    One of the differences between show/hide and css() methods is that the first ones implement some animation mechanisms. So, if the last correctly works, there could be some issues with the animation implementation itself.

    Pit

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Re: jQuery show() and hide() do not work on device.

    Quote Originally Posted by netomarin View Post
    Hi Christian,
    The hide and show just don't work or your widget crashes?
    I'm asking this because I had a problem with DIVs with the property "display: none" and when I tried to use hide or show my widget just exited.
    It "just exits", which is what I call a crash.

    jappit - I didn't had time yet, but will test your trimmed down code soon.

    Christian

Similar Threads

  1. how to show and hide cursor of CEikEdwin dynamically?
    By JackSu in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-12-23, 16:38
  2. [MMAPI] FullCanvas -> show and hide camera view
    By nokia_devil in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-08-02, 09:41
  3. able to hide buttons - not able to show them again
    By sunny_singh in forum Symbian
    Replies: 0
    Last Post: 2005-11-24, 10:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •