I am creating a pop up.I am using fancybox ,it is working fine when I include it normally in html as:
<script type="text/javascript">
$(document).ready(function($){
$.fancybox.open([{
content: $('<a href="http://www.google.com" target="_blank">Gmail</a>')
}]);
});
</script>
But when i write the same quote in drupal_add_js its not working:
drupal_add_js('jQuery(document).ready(function(){
$.fancybox.open([{
content: $("<a href=\'http://www.google.com\' target=\'_blank\'>Gmail</a>")
}]);
});','inline');
I am passing it as inline java script,someone can tell me what is the error due to which its happening.I have included the fancybox js and css.