DaNcE-eViL
[H]ard|Gawd
- Joined
- Oct 31, 2001
- Messages
- 1,128
im bit confuse atm regarding loading .js file see below:
in html tag - we use as the following code:
code1:
<script type="text/javascript" src="<?php echo $ServerURL?>Javascripts/basicgallery.js" charset="UTF-8"></script>
but i rather not to load above code1 but i'd like to load code2 below but it wont load properly but still work with code 1..
code2:
<script type="text/javascript">
jQuery(function ($) {
// Load dialog on page load
// Load dialog on click
$('#test-modalbox .basicSlideshow').click(function (e) {
$('#test-modalbox-content').modalbox();
return false;
});
});
</script>
any idea what im doing wrong
in html tag - we use as the following code:
code1:
<script type="text/javascript" src="<?php echo $ServerURL?>Javascripts/basicgallery.js" charset="UTF-8"></script>
but i rather not to load above code1 but i'd like to load code2 below but it wont load properly but still work with code 1..
code2:
<script type="text/javascript">
jQuery(function ($) {
// Load dialog on page load
// Load dialog on click
$('#test-modalbox .basicSlideshow').click(function (e) {
$('#test-modalbox-content').modalbox();
return false;
});
});
</script>
any idea what im doing wrong