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

Reply
Trusted Contributor
bertho_joris
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Re: Using jQuery Lib in bbUI

[ Edited ]

I have to move my script tag into <div> you mean.

 

But it does not change anything


Have you tried the same thing like this?

Regards,
Bertho
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Using jQuery Lib in bbUI

I have not tried the exact same thing you are doing, but I know of others who are.  Yes, you do need to move your script tag into the screen <div>

 

Have you verified if $("#DropDownList2") is returning something other than undefined/null?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Trusted Contributor
bertho_joris
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Re: Using jQuery Lib in bbUI

I tried to add syntax :

 

var test = $("#DropDownList2 option:selected").text();
alert(test)

 And this result is : HERE

Regards,
Bertho
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Using jQuery Lib in bbUI

And you are using v0.9.4 from the "next" branch.. that is the one that has the hide() function... 

 

If you are using v0.9.4 and the hide() function isn't working with jQuery, can you try doing the following:

 

document.getElementById('DropDownList2').hide()

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Trusted Contributor
bertho_joris
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Re: Using jQuery Lib in bbUI

[ Edited ]

Oh...God...Your code runs smoothly without any problems...:Rockon:

What happen with jQuery?

Regards,
Bertho
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Using jQuery Lib in bbUI

What I'm trying to figure out is $("#DropDownList2') returning?  Is it the actual select? or something else? is hide() defined on that object etc...

 

By grabbing the div directly it seems to work

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Trusted Contributor
bertho_joris
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Re: Using jQuery Lib in bbUI

I have tried using jQuery 1.7.1 and 1.8.1 but they do not produce any results. Still failed to perform the command.

 

But succeed when using :

 

document.getElementById('DropDownList2').hide()
Regards,
Bertho
Please use plain text.