I know that .append()
does not have any callback function, but when I try to do this:
$.onShadowboxFinished = function (f) {
var postid = $(f.link).parent().attr("id");
var loadUrl = "wp-admin/admin-ajax.php?action=mfields_show_post&p=" + postid;
$('#infos_wrap').load(loadUrl).append();
alert("loaded! test selector :"+$('a.projectimgs').first().attr("href"));
}
I am loading content ( links and images ) into the div #infos_wrap
. Once all links and images are loaded, I want to manipulate content ( example : Select the links to add them to the shadowbox cache )
For now, the 4th line is executed before the 3th.
Thanks for your help !
PS : If someone want really to help ( i'd appreciate it ^^ )
You can check the site : http://www.tom-portfolio.fr/wp-login.php
login: visitor
pass: visitor
The javascript file is portfolio.js
Use your firebug or GoogleDev tools to view it!
Thanks a lot !