Grow your CSS skills. Land your dream job.

Anything Slider works in .html but not .aspx

  • # March 20, 2013 at 8:17 pm

    Using 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

    We’d have to see the page in action to figure out what could be wrong.

    # March 20, 2013 at 9:10 pm

    @shelliezdesign,

    Silly question but are you running the page in IIS?

    # March 20, 2013 at 11:30 pm

    Any 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

    Not 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

    http://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

    My last resort will be an iframe :( Don’t like iframes!

    # March 21, 2013 at 5:17 pm

    @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

    Hi @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

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".