jquery - fancybox not attached to links after ajax call -


I use fancybox to attach a small photo in a link to show a bigger photo it works fine Tooltip was a small problem with the jQuery app, which is why I get var 'title_from_alt' and set a fancybox title with it It is not very relevant.

OK, now I'm retrieving a page through an AJAX call. On partial, there are new links with category 'fancyboxfoto' but they do not have fancybox attached to these newly added links.

I read at .on and .live and so on, but they want an event (like 'click'), but I do not see an event 'click' below in the code what to do!

  jquery (document) .ready (function ($) {// fancybox var title_from_alt = $ ("a.fancyboxfoto"). Attr ("alt"); $ ("affancyboxfoto "(Fancybox) ({'titleposition': 'over', 'oncomplete': function () {$ (" # fancybox-wrap "). Hover (function () {$ (" # fancybox-title "'# 000 'True', 'autoskele': 'true', 'autodynaments': 'true'});} ;   

HTML

  title = "fancyboxfoto" title = "Turzo Martha, ShipWrecked, 2002" href = "/ images / shipwrecked.jpg "& Gt; img class =" tiptip "vspace =" 12 "hspace =" 12 "align =" left "heading =" Turzo Martha, Shipware, 2002 "src =" / images / shipwrecked-kl.jpg " & G  

fancybox v1.3.x dynamic

You can find a (example insert)

BTW, while using that method, you will see " via AJAX" After recovering the new DOM elements, there is no need to start faxbox again "

Comments