0

I am working with Yii and I have added isotope to my CListView and CGridView pages so display them a little better.

This works fine, except when the pagination is used, and the content on the page is changed using ajax the isotope no longer works.

This in itself is an easy fix, I just need to re-initiate the isotope library, the problem is I need to add my function to the onsuccess function of the ajax call used by the pagination.

My question is, how can I add javascript to the pagination function so when the ajax call is a success I can re-initiate my isotope library. I can't seem to find any options or ideas of where to add this.

Note: I also tried using the DOMSubtreeModified method where I track if an element has changed and do it that way but it seems to crash my firefox when using the isotope code.

Thanks

1 Answer 1

2

CListView has afterAjaxUpdate that you can use, see here for more info,

also CGridView has the same, look here

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot! Worked perfectly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.