codelevel
asked on
declaring variable
how to declare multiple variables without redundancy?
for example there are multiple <p> tags with ids in a page.
how to dynamically create unique variables on the fly looping through the page?
<script type='text/javascript'>//< ![CDATA[
$(function() {
var text = $('#first').text();
var text = $('#second').text();
var text = $('#third').text();
});
//]]>
</script>
for example there are multiple <p> tags with ids in a page.
how to dynamically create unique variables on the fly looping through the page?
<script type='text/javascript'>//<
$(function() {
var text = $('#first').text();
var text = $('#second').text();
var text = $('#third').text();
});
//]]>
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.