I have seen many examples on how to use the .load() function to load in static elements, but I am trying to load a dynamic element, specifically a scrollable.
I have gotten it to the point where:
1) the scrollable will function if I directly view PageToLoad.asp in the broswer.
2) the static elements of the scrollable will load onto MainPage.asp. (i.e., it looks right)
3) the scrollable does not function as loaded on to MainPage.asp.
I assume that my javascript is somehow incorrect in how I'm loading PageToLoad.asp, but I can't figure out why.
I have the function that makes the scrollable run on PageToLoad.asp (here is a small selection of it):
- $(document).ready(function() {
-
var api = $("div.scrollable").scrollable({
-
size: 7,
-
api: true
-
});
And all I have on MainPage.asp is:
- $(document).ready(function() {
-
$('#scrollableC').load('PageToLoad.asp');
-
});
I also import the "include" files into both MainPage.asp and PageToLoad.asp:
- <script type="text/javascript" src="subroutines.js"></script>
-
<script type="text/javascript" src="jQuery/jquery-1.3.2.js"></script>
-
<script type="text/javascript" src="jQuery/jquery.tools.min.js"></script>
As well as my css files.
How can I get the scrollable to animate when it is loaded?
Than you for any and all ideas.