Execute jQuery after Ajax Request
The text on a JSP-PAge is trimmed by the jQuery Text Overflow Plugin. The Scri开发者_如何学Gopt is executed after the page has loaded but not after the Ajax-Request (Switching Tabs). How to ensure its functionality in this case?
<rich:tabPanel switchType="ajax" ...>
<rich:tab>...</rich:tab>
<rich:tab>...</rich:tab>
...
</rich:tabPanel>
<script type="text/javascript">
var text_to_trim = jQuery('.table_modul td, .docs_links li, .shoppingCart li');
jQuery(text_to_trim).textOverflow(null, true); //Text Overflow Plugin
</script>
Defined a named jQuery function using rich:jQuery and then call it via oncomnplete=namedJQueryFunction();
精彩评论