$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
Comment #1
oscnet commentedjquery.com had fixed it . http://dev.jquery.com/ticket/1001
Comment #2
(not verified) commentedComment #3
bharanikumariyerphp commentedwhere 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