CSS3 PIE Forums
http://css3pie.com/forum/

Apply pie after ajax call
http://css3pie.com/forum/viewtopic.php?f=3&t=1837
Page 1 of 1

Author:  mcmwhfy [ Fri Nov 02, 2012 2:16 am ]
Post subject:  Apply pie after ajax call

Hello guys, I'm trying to apply pie js for some element added after ajax call, my function looks like :

window.document.ready = function()
{
Wicket.Ajax.registerPostCallHandler(pieStarter);
}
function pieStarter() {
try {
alert(window.navigator.userAgent);
if (window.PIE) {
alert.log(this);
$(' #currentPageTitle, ul#main li, .close')
.each(function() {
alert(this);
//PIE.attach(this);
});
}
} catch (e) {
alert("PIE failed:"+e);
}
}

but every time I recive this error:
error: object doesn't support this property or method

What is wrong ?

Author:  rulernature [ Fri Nov 09, 2012 3:29 am ]
Post subject:  Re: Apply pie after ajax call

This is the fix if anybody has this problem :

function:
window.document.ready = function(){
Wicket.Ajax.registerPostCallHandler(pieStarter); // every time when an ajax request is made
}
function pieStarter(){
if (window.PIE) {
go();
}
}
function go(){
$('.class1,.class2,#id3').each(function(){
PIE.detach(this);
});

$('.class1,.class2,#id3').each(function(){
PIE.attach(this);
});
}

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/