$output ='<a class="中文" >abc</a>';
	drupal_add_js('
		 $(document).ready(function() {
   			$("a.中文").click(function() {
     		alert("Hello world!");
   		});
 		});' ,'inline');
	return $output;

this do not worked.

$output ='<a class="foo" >abc</a>';
	drupal_add_js('
		 $(document).ready(function() {
   			$("a.foo").click(function() {
     		alert("Hello world!");
   		});
 		});' ,'inline');
	return $output;

it's worked.

Comments

oscnet’s picture

Status: Active » Fixed

jquery.com had fixed it . http://dev.jquery.com/ticket/1001

Anonymous’s picture

Status: Fixed » Closed (fixed)
bharanikumariyerphp’s picture

$output ='<a class="foo" >abc</a>';
drupal_add_js('
$(document).ready(function() {
   $("a.foo").click(function() {
     alert("Hello world!");
   });
});' ,'inline');
return $output;

where we have to write the above code,

In tpl or in module,

If in module , then which place we have write the function ,

If in tpl , which place we have to write