{"action":"opened","issue":{"url":"https://api.github.com/repos/fancyapps/fancybox/issues/1685","repository_url":"https://api.github.com/repos/fancyapps/fancybox","labels_url":"https://api.github.com/repos/fancyapps/fancybox/issues/1685/labels{/name}","comments_url":"https://api.github.com/repos/fancyapps/fancybox/issues/1685/comments","events_url":"https://api.github.com/repos/fancyapps/fancybox/issues/1685/events","html_url":"https://github.com/fancyapps/fancybox/issues/1685","id":265463184,"number":1685,"title":"Adding <a> tags to  <img> tags by jQuery and then using fancybox doesn't work？","user":{"login":"Lemonreds","id":23014238,"avatar_url":"https://avatars1.githubusercontent.com/u/23014238?v=4","gravatar_id":"","url":"https://api.github.com/users/Lemonreds","html_url":"https://github.com/Lemonreds","followers_url":"https://api.github.com/users/Lemonreds/followers","following_url":"https://api.github.com/users/Lemonreds/following{/other_user}","gists_url":"https://api.github.com/users/Lemonreds/gists{/gist_id}","starred_url":"https://api.github.com/users/Lemonreds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lemonreds/subscriptions","organizations_url":"https://api.github.com/users/Lemonreds/orgs","repos_url":"https://api.github.com/users/Lemonreds/repos","events_url":"https://api.github.com/users/Lemonreds/events{/privacy}","received_events_url":"https://api.github.com/users/Lemonreds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-14T04:21:43Z","updated_at":"2017-10-14T04:21:43Z","closed_at":null,"author_association":"NONE","body":"\r\nsuch : \r\n`\r\n$(function(){\r\n\r\n        var $imgs = $('img');\r\n        $imgs.each(function(){\r\n          //$(this).attr('alt','')\r\n          var src = ($(this).attr('src'));\r\n          var a = \"<a href=\\\"\"+ src +\" \\\">\" + \"</a>\";   \r\n          $(this).wrap(a);  \r\n        });\r\n\t\t $('a:has(img)').each(function () {\r\n\t\t \t$(this).addClass('fancybox');\t\t \r\n\t\t });\r\n\r\n        $('.fancybox').fancybox();      \r\n\r\n});\r\n\r\n`"}}
{"actor":{"display_login":"Lemonreds"}}