Vivi
Vivi

Reputation: 243

Call jquery plugin after html load using Ajax

On my project, I need to styling input radio button, so I use jquery uniform plugin. But on this page, radio button display after some Ajax loaded. I don't have permission to edit the form and Ajax function, so I can't use like knockout or data-hook. The result is radio button just like as usual. How can I call that plugin, after radio button display without editing Ajax function or that form? Sorry for my bad English. :)

Upvotes: 0

Views: 131

Answers (2)

sideroxylon
sideroxylon

Reputation: 4416

You should try $(document).ajaxComplete(function() {, as $(document).ready(function() { will trigger before the ajax function has loaded the additional content.

Upvotes: 1

user4467065
user4467065

Reputation: 141

Maybe the problem is that your javascript function runs before your html is done loading.

I think the .ready() function can help you

Upvotes: 0

Related Questions