Results 1 to 2 of 2

Thread: Ultimate Fade In Slideshow in a css file

  1. #1
    Join Date
    Dec 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Ultimate Fade In Slideshow in a css file

    1) Script Title: Ultimate Fade In Slideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: Rather than have the script in each page of my website, how would I place it in my global css file.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    CSS and Javascript are different. You can't use Javascript inside CSS, so you cannot place Javascript in your CSS file.

    You can, however, create one [or more] external CSS .css file and one [or more] external Javascript .js file. Then you can include each of these in every page on your website. There's no shortcut for that part. (One option would be to use some kind of templating or Content Management System [CMS] to generate your different pages for you including the CSS and JS, but this would require some time and knowledge to configure-- not a bad idea if you want to try it.)


    Instructions for moving Javascript to an external file:
    1. Create a <script...> tag that will include the relevant file.
    2. Copy all text from betwee <script> tags on your page. Paste it into the external file. Order matters, so move it step by step, in the same order that the different <script> blocks appear in the page's source code.

    A detail about this script (and some others):
    This script requires <div> elements (and other code-- see the demo page) in the body of your page. You could include the Javascript but without this nothing would happen. Therefore, you must include that code in every page on your website. There is no way around that.*

    [*Actually, there are two ways, but they're complicated: 1) use templating as I suggested above; 2) use Javascript to dynamically add these to each of your pages-- possible but complicated and might take a lot of work to get it to all run smoothly in the end. In short, you can't do that without significantly modifying the script. Plus, you'll need to add in the JS file anyway, so it's not much more work to cut and paste a few more lines.]
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Similar Threads

  1. Localized jquery file for Ultimate Fade in Slideshow?
    By mag3 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-12-2012, 08:09 PM
  2. Ultimate Fade-in slideshow (v1.51) overlaping with .png file
    By Frogger in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-02-2010, 02:04 AM
  3. Ultimate Fade-In Slideshow: how to use with attached .js file
    By be23 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-05-2009, 03:20 PM
  4. Ultimate Fade-in slideshow (v1.51) - External JS File Assistance
    By AdinE in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 09-30-2007, 01:17 AM
  5. Ultimate Fade-In Slideshow ext file problem
    By motherandmore in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 03-11-2006, 04:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •