1 Replies - 670 Views - Last Post: 31 December 2010 - 01:32 AM

#1 sidhu_sree  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 37
  • Joined: 08-October 09

javascript plugin not working

Posted 30 December 2010 - 11:22 PM

I have following code with 2 external files check these

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery_002.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    var sl=$('#slider');
	sl.cycle({
		fx: 'fade',
	});
});
</script>


This code is for sliding two or more images this works fine for index.html file but not working for files in sub directory ,in dreamweaver after choosing id="... am get slider as identifier in list box for index.html file
where code works fine ,similar is not seen in sub directory files
path to external .js files is correct in all case

any one help

Is This A Good Question/Topic? 0
  • +

Replies To: javascript plugin not working

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3390
  • View blog
  • Posts: 9,586
  • Joined: 08-June 10

Re: javascript plugin not working

Posted 31 December 2010 - 01:32 AM

that’s because from the subdirectories the path to the script files are incorrect.

# from the first level subdirectory:
<script type="text/javascript" src="../js/jquery.js"></script>

absolute paths would be better in this case.

This post has been edited by Dormilich: 31 December 2010 - 01:32 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1