AddingJavascriptSlider
AddingJavascriptSlider
Version 1.1
Adding a JavaScript Slider to a page
The agency templates are built with a front-end framework called Bootstrap. One advantage of
Bootstrap is that in the agency templates it allows content “hooked in to Bootstrap” to
accommodate mobile devices. Bootstrap components can be used without adding any
additional JavaScript or CSS to the site. The slider is one such component. This document
describes the process to add a responsive slider to a page in your agency site.
Page | 2
3. Select “Picture Library.”
4. Give your picture library a name with no names or spaces. This will help to generate a
cleaner URL to your images.
After your library has been created, you can upload your images to the library.
Upload pictures
1. Click on the library you created and select “new document”.
Page | 3
Figure 6 Add a picture file chooser
2. Use the Add a picture file chooser to locate and upload an image.
3. Complete the picture properties form, adding a title, and keywords if needed, and save.
4. Repeat steps for as many images that you need to rotate in your slider.
Page | 4
2. Copy the address in the browser address bar and save it in your document.
Example: /WOWSlider/data1/images/_w/retro_robot3_jpg.jpg
2. Navigate to the Carousel section and locate the slider HTML, which will look similar to
the example below.
Page | 5
Figure 8 Slider html and Copy button
3. Copy and paste the HTML for the slider by either highlighting the code or use the copy
button on the top right.
4. Navigate to the page you would like to insert a slider. From the ribbon, click on
the gear icon and select “Edit page.”
Page | 6
Figure 9 Edit page menu item
5. Click an area within the page where you would like to add the slider and navigate to the
“Insert” tab in the SharePoint ribbon and select “Embed Code.”
Page | 7
6. Copy and paste the Bootstrap html code and update the image paths to the images
uploaded in your library.
Your image slider should now look like this. The slider can always be updated by clicking the
“edit snippet” link on the bottom right of the slider.
Page | 8
Appendix A: Sizing and Optimizing Images
Preparing an image to be used online requires selecting the right size, file format, and image
resolution. Whether you repurpose some graphics that you previously used with your offline
marketing efforts or if you have new images you would like to prepare for use on your website,
there are a few web graphic best practices you should follow.
.png is the file format for transparent images. Saving files as PNGs has two options—8 or 24 bit.
For semi-transparent images, you must use 24 bit. If your image has only a handful of colors you
can select the 8-bit version to save a little file size without it affecting the quality of the image.
Reducing the resolution is one way to drastically decrease file size without decreasing the
quality of the image on the screen. Resolution is a measurement of how dense an image is. It is
measured in DPI or dots per inch. It is a legacy term from the world of print. For printed images,
you want very dense graphics that are normally above 300dpi but can go up to 1200dpi.
Most computer monitors will only display at 72dpi. This means that any resolution higher than
that is not adding anything to the quality of the image, but is rather just increasing the file size.
So a 300dpi image and a 72dpi version of the same image will look exactly the same on the
screen, but the 300dpi one will be over four times larger in file size.
Page | 9