开发者

Execute jQuery after Ajax Request

开发者 https://www.devze.com 2023-03-21 20:39 出处:网络
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

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消