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
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE
My Carrier: P4
Accepted Solution

[BB10] jQuery click() not work

Hi,

I have one big problem with jQuery on WebWorks:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--
	Copyright 2010-2012 Filip Kula
-->

<div data-bb-type="screen" data-bb-effect="fade">
	<div id="list" data-bb-type="image-list" data-bb-style="arrowlist" data-bb-images="none">
		<div data-bb-type="item" data-bb-title="Main option" id="transmit">Description</div>
	</div>
	<div data-bb-type="image-list" data-bb-images="none" id="moreTrans">
		<div data-bb-type="item" data-bb-title="Option 1"></div>
		<div data-bb-type="item" data-bb-title="Option 2"></div>
		<div data-bb-type="item" data-bb-title="Option 3"></div>
		<div data-bb-type="item" data-bb-title="Option 4"></div>
		<div data-bb-type="item" data-bb-title="Option 5"></div>
	</div>
</div>
<script type="text/javascript">
	$('#transmit').click(function()	{
		$('#moreTrans').css('display', 'none');
	});
	
	jQuery(document).ready(function(){
		$('#transmit').click(function()	{
			$('#moreTrans').css('display', 'none');
		});
	});
</script>

 

and when I click on "Main option" element in Ripple emulator, div "moreTrans" didn't hide...

Of course jQuery is added into application correctly, because code:

 

<script type="text/javascript">
	function ready()	{
		$('#moreTrans').css('display', 'none');
	}
	document.addEventListener("webworksready", ready);
</script>

 auto-hide "moreTrans" div on start...

 

Thanks for help :smileyhappy:

All time online :smileyvery-happy:
Please use plain text.
Contributor
paroxysm
Posts: 35
Registered: ‎09-15-2012
My Device: AT&T Torch 9810
My Carrier: AT&T

Re: [BB10] jQuery click() not work

It could be that ripple fires touch events rather than click events when interfacing with it's mock up devices, might be something to look into.

Please use plain text.
Developer
26filip
Posts: 232
Registered: ‎01-30-2011
My Device: Dev Alpha C, Z10 LE
My Carrier: P4

Re: [BB10] jQuery click() not work

I put JavaScript into file and now everything works good.

 

But thanks for help :smileywink:

All time online :smileyvery-happy:
Please use plain text.