treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] [Anything Slider] integration with CMS - get rid of empty images

  • Hi All,

    I'm implementing anything slider with a cms. There is an option to upload 6 slides, and I have a class (disabled) applied to each slide that is missing any image url attribute. With my very basic knowledge of jQuery, I was able to stop the page from showing a broken image if no image is supplied, however I have no idea how to add the code to delete the corresponding navigation.

    Here's what I'm using on the page to get rid of the tag. Any assistance from one of you gurus would be greatly appreciated.


    <script type="text/javascript">
    $(document).ready(function() {
    $('.disabled').remove();

    });
    </script>
  • Which CMS are you working with?
  • Hi Teee!

    Just try re-initializing the plugin:
    $(document).ready(function() {
    $('.disabled').remove();
    $('#slider').anythingSlider();
    });
  • @Mottie! Thank you SO much. I can't believe something so simple was making me so crazy :)


    @doobie: Actually a custom web app in Business Catalyst. I didn't want to invite any info that was too far off the mark here so I figured I'd leave the specific platform out :)

    Thanks guys. This is a great resource!