Forums
View unanswered posts | View active topics It is currently Mon Sep 01, 2014 2:59 pm



Reply to topic  [ 2 posts ] 
 Apply pie after ajax call 
Author Message

Joined: Wed Aug 17, 2011 9:20 am
Posts: 6
Post 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 ?


Fri Nov 02, 2012 2:16 am
Profile

Joined: Tue Nov 29, 2011 1:26 am
Posts: 38
Post 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);
});
}


Fri Nov 09, 2012 3:29 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.