Skip to content

Instantly share code, notes, and snippets.

@antonydevanchi
Created July 21, 2021 19:58
Show Gist options
  • Save antonydevanchi/9e23278ffb66a1f26b59797a8cc4f9ba to your computer and use it in GitHub Desktop.
Save antonydevanchi/9e23278ffb66a1f26b59797a8cc4f9ba to your computer and use it in GitHub Desktop.
tb.ru snippets
<link rel="stylesheet"href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css"><script src="https://code.jquery.com/jquery-3.6.0.min.js"></script><script>$(document).ready(function(){var a=$(".js-list .js-slide img.sb-image-crop");0<a.length&&(a.each(function(a,t){t.attributes.forEach(function(a){"data-src"==a.name&&$(t).parent().html('<a data-fancybox="single" href="'+a.nodeValue+'">'+t.outerHTML+"</a>")})}),jQuery.ajax({url:"https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js",dataType:"script",async:!0}))})</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment