开发者

How Do I load a jquery function dynamically?

开发者 https://www.devze.com 2023-03-04 01:41 出处:网络
I\'m currently working on a Java web application, and have dynamically generated input boxes on the jsp page. I\'m trying to use the setupElementMasks() function from http://www.xaprb.com/html-input-m

I'm currently working on a Java web application, and have dynamically generated input boxes on the jsp page. I'm trying to use the setupElementMasks() function from http://www.xaprb.com/html-input-mas开发者_StackOverflow中文版k/html-form-input-mask.js to mask input. My input boxes are generated dynamically so would I have to use jquery's .load function to load the desired function?


I think you're looking for the .live() function.

http://api.jquery.com/live/

Description: Attach a handler to the event for all elements which match the current selector, now and in the future.


<script src="/http://www.xaprb.com/html-input-mask/html-form-input-mask.js"></script>
<script>
$(function(){

    doworkhere();

});
</script>

HTH

0

精彩评论

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