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 Device Forums on April 1st (Developers, see below)

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

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Toggle class not work when apply on fixed div?

I am working toggle class .Actually I want to toggle something (a div ) when i click on header button (fourth button) ?It is not working.It is not toggling ? why? http://jsfiddle.net/ravi1989/3xbGW/11/I want to toggle this contend..? why it is not toggling?
 
<div class="ui-grid-c" id="searchbar" style="display: none" class="searchContend_h">
<input name="text-12" id="text-12" value="" type="text" autocorrect="off" class="searchbox"> <a href="#" data-role="button" data-corners="false" data-inline="true" class="search">Search</a>
<a href="#" data-role="button" data-corners="false" data-inline="true" id="next" class="searchNext" disabled>Next</a>
<a href="#" data-role="button" data-corners="false" data-inline="true" id="prev" class="searchPrev" disabled>Previous</a>
 
</div>

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Toggle class not work when apply on fixed div?

To toggle a class on a DOM element, you can use the following HTML5 APIs (i.e. toggle):

http://davidwalsh.name/classlist

 

Is the issue you are seeing that the header button does not execute its code or that the class is not being toggled? I might recommend a simpler sample as a starting point; try to see if you can toggle the text of a paragraph from black to red when clicking a button.

 

The fundamental usage is the same and it will be easier to test than a full-fledged jQuery sample.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.