Overriding of jsp tags and jquery selectors -


say have container add widgets , user can add two/more instances of same widget. widget internally loads jsp page has html code , jquery code , struts tags.

my jsp:

<div id"sample1"/>     <-- html part struts tags -->  <script>     methods perform actions </script> 

when 2 or more widgtes added in same page selectors using jquery obviuosly wont work appropriately due duplicate ids. solution unique id each widget instance. have below each element , function. how make process less cumbersome there lot of jsps , widgtes.

<div id"sample1-"<s:property value="uniqueid">" /> loadsample1-"<s:property value="uniqueid">" = function () {  } 


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -