Home › Forums › JavaScript › Anything Slider works in .html but not .aspx
- This topic is empty.
-
AuthorPosts
-
March 20, 2013 at 8:17 pm #43538
shelliezdesign
MemberUsing an .aspx web form with a MasterPage. I applied a recent Basic jQuery Slider and it works fine with external and internal .js.
I then needed a slider to play video, so I installed the AnythingSlider. This slider works fine in .html and on the .aspx page, I get scroll bars. Looks like it’s not reading the internal javascript??
I use a ton of javascript and Jquery, so this makes NO sense to me. No syntax errors in Dreamweaver either – code is clean. I’m done researching have exhausted all my efforts for the AnythingSlider on an aspx page.
Just looking for a player with images and video and when the video plays, the slider “stops” animating. The Basic Slider (http://basic-slider.com/) works great too, but I can’t figure out how to stop the animation as the video plays through. You would think I would be able to find some code for that and it would be easy. No luck on that either.
This is the AnythingSlider internal javascript that is not rendering in aspx, but will in .html:
$(document).ready(function() {
$(‘#slider1’).anythingSlider({
resizeContents : true,
addWmodeToObject : ‘transparent’,
navigationFormatter : function(index, panel){ // Format navigation labels with text
return [index – 1];
}
});
});This is the Basic Slider javascript, but it will not stop animating when I stop to watch a video in slide #4.
$(document).ready(function() {
$(‘#banner’).bjqs({
‘animation’ : ‘slide’,
‘width’ : 750,
‘height’ : 425
});});
Any assitance would be appreciated.
March 20, 2013 at 8:24 pm #129082Senff
ParticipantWe’d have to see the page in action to figure out what could be wrong.
March 20, 2013 at 9:10 pm #129090JohnMotylJr
ParticipantSilly question but are you running the page in IIS?
March 20, 2013 at 11:30 pm #129108CoryB
MemberAny way to post how you are referencing it in your master page? It wouldnt be stored in a lower directory from the page its inheriting from? Ex resolve your ref just in case:
src=”<%=ResolveUrl("~/Includes/Scripts/jquery.js") %>“
March 21, 2013 at 4:41 pm #129266shelliezdesign
MemberNot running in IIS. I can try the ResolveURL. I’ll post it live if that doesn’t work. Thanks for the responses!
March 21, 2013 at 4:57 pm #129267shelliezdesign
Memberhttp://www.axium.com/company/jwtest.aspx
Here is the page. (Ignore the name of the page…I have done all kinds of testing). The Master is old and kind of a mess. Just looking to see why this code is not rendering:
$(document).ready(function() {
$(‘#slider1’).anythingSlider({
resizeContents : true,
addWmodeToObject : ‘transparent’,
navigationFormatter : function(index, panel){ // Format navigation labels with text
return [index – 1];
}
});
});March 21, 2013 at 5:08 pm #129268shelliezdesign
MemberMy last resort will be an iframe :( Don’t like iframes!
March 21, 2013 at 5:17 pm #129270JohnMotylJr
Participant@shelliezdesign, What server side framework are you using, are you testing inside visual studio, and c# or vb.net? On the inital page load it throws over 80 errors so that makes me believe there is a problem with processing your master page. And XHTML strict? The reason it works as a standalone html file vs aspx is because there might be something trying to make calls either before the dom loads or targeting selectors before they are created.
EDIT: OMG NO! No need for iframes lol… Is this a time sensitive project?
March 22, 2013 at 12:23 pm #129356Mottie
MemberHi @shelliezdesign!
I’m seeing at least three issues:
1. The main problem is that jQuery is being loaded twice. Remove the script tag at line 62, because jQuery is already being loaded at line 18.
2. The url to the swfobject has an extra “j” at the beginning: `` (line 26).
3. The url to modernizr is broken as well: http://www.axium.com/js/modernizr.custom.29473.js
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.