{"id":6501,"date":"2024-01-11T16:46:00","date_gmt":"2024-01-11T16:46:00","guid":{"rendered":"https:\/\/codehim.com\/?p=6501"},"modified":"2024-01-22T14:47:18","modified_gmt":"2024-01-22T09:47:18","slug":"javascript-quotes-slideshow-with-images","status":"publish","type":"post","link":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/","title":{"rendered":"JavaScript Quotes Slideshow with Images"},"content":{"rendered":"<p>This JavaScript code snippet helps you to create a quotes slideshow with images. It comes with a decent interface to slide the quotes with next\/previous buttons. The quotes, author, and likes data are stored in an object that renders to HTML.<\/p>\n<h2>How to Create JavaScript Quotes Slideshow with Images<\/h2>\n<p>1. First of all, create the HTML structure as follows:<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;div class=\"page-wrapper\"&gt;\r\n  &lt;div class=\"inner-background\"&gt;\r\n    &lt;div class=\"quote-container\"&gt;\r\n      &lt;div class=\"quote-photo-wrapper\"&gt;\r\n        &lt;div class=\"quote-photo-overlay\"&gt;\r\n          &lt;div class=\"quote\"&gt;&lt;i class=\"fa fa-quote-left\" aria-hidden=\"true\"&gt;&lt;\/i&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;img id=\"quote-image\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/1\/1b\/Abraham_Lincoln_November_1863.jpg\" \/&gt;\r\n        &lt;div class=\"nav-btns\"&gt;\r\n          &lt;div id=\"move-left\"&gt;&lt;span&gt;&lt;i class=\"fa fa-angle-left\"&gt;&lt;\/i&gt;&lt;\/span&gt;&lt;\/div&gt;\r\n          &lt;div id=\"move-right\"&gt;&lt;span&gt;&lt;i class=\"fa fa-angle-right\"&gt;&lt;\/i&gt;&lt;\/span&gt;&lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n      &lt;div class=\"quote-details-wrapper\"&gt;\r\n        &lt;div id=\"quote-header\"&gt;\r\n          &lt;div class=\"like-wrapper\"&gt;\r\n            &lt;span class=\"heart\"&gt;&lt;i class=\"fa fa-heart\" aria-hidden=\"true\"&gt;&lt;\/i&gt;&lt;\/span&gt;\r\n            &lt;span id=\"quote-likes\"&gt;111&lt;\/span&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div id=\"quote-body\"&gt;Things may come to those who wait, but only the things left by those who hustle.&lt;\/div&gt;\r\n        &lt;div id=\"quote-footer\"&gt;- &lt;span id=\"quote-author\"&gt;Abraham Lincoln&lt;\/span&gt;&lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;     \r\n<\/pre>\n<p>2. After that, add the following CSS styles to your project:<\/p>\n<pre class=\"prettyprint linenums lang-css\">html, body {\r\n  height: 100%;\r\n  width: 100%;\r\n}\r\n\r\n.page-wrapper {\r\n  background: #FFF;\r\n  padding: 25px;\r\n  height: 93%;\r\n  font-family: \"Archivo Black\", sans-serif;\r\n}\r\n.page-wrapper .inner-background {\r\n  min-height: 470px;\r\n  background: #bbc2c5;\r\n  \/* For browsers that do not support gradients *\/\r\n  background: -webkit-radial-gradient(bottom left, #bbc2c5, #e5ecef);\r\n  \/* For Opera 11.1 to 12.0 *\/\r\n  background: -o-radial-gradient(bottom left, #bbc2c5, #e5ecef);\r\n  \/* For Fx 3.6 to 15 *\/\r\n  background: -moz-radial-gradient(bottom left, #bbc2c5, #e5ecef);\r\n  \/* Standard syntax *\/\r\n  background: radial-gradient(bottom left, #bbc2c5, #e5ecef);\r\n  height: 100%;\r\n  width: 100%;\r\n  position: relative;\r\n}\r\n.page-wrapper .inner-background .quote-container {\r\n  width: 670px;\r\n  height: 470px;\r\n  background: #179ffe;\r\n  position: absolute;\r\n  left: 0;\r\n  right: 0;\r\n  top: 0;\r\n  bottom: 0;\r\n  margin: auto;\r\n  max-width: 100%;\r\n  max-height: 100%;\r\n  overflow: none;\r\n  -webkit-box-shadow: 1px 37px 34px -13px rgba(0, 0, 0, 0.75);\r\n  -moz-box-shadow: 1px 37px 34px -13px rgba(0, 0, 0, 0.75);\r\n  box-shadow: 1px 37px 34px -13px rgba(0, 0, 0, 0.75);\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper {\r\n  position: absolute;\r\n  width: 25%;\r\n  z-index: 1;\r\n  overflow: hidden;\r\n  left: 0;\r\n  height: 470px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .quote-photo-overlay {\r\n  background: #000;\r\n  z-index: 85;\r\n  position: absolute;\r\n  top: 0;\r\n  left: 0;\r\n  width: 100%;\r\n  height: 100%;\r\n  opacity: 0.6;\r\n  text-align: center;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .quote-photo-overlay .quote {\r\n  color: #FFF;\r\n  font-size: 50px;\r\n  margin-top: 30px;\r\n  opacity: 0.3;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper img {\r\n  height: 470px;\r\n  margin-left: -75px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns {\r\n  position: absolute;\r\n  bottom: 10px;\r\n  font-size: 30px;\r\n  font-weight: bold;\r\n  color: #FFF;\r\n  width: 100%;\r\n  text-align: center;\r\n  padding-left: 15px;\r\n  z-index: 9999;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-left,\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-right {\r\n  float: left;\r\n  width: 60px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-left &gt; span,\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-right &gt; span {\r\n  cursor: pointer;\r\n  font-weight: bold;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-left &gt; span:hover,\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns #move-right &gt; span:hover {\r\n  color: #179ffe;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-photo-wrapper .nav-btns :after {\r\n  content: \"\";\r\n  display: block;\r\n  clear: both;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper {\r\n  width: 70%;\r\n  z-index: 1000;\r\n  height: 100%;\r\n  padding-right: 30px;\r\n  position: absolute;\r\n  right: 0;\r\n  text-transform: uppercase;\r\n  color: #FFF;\r\n  min-height: 470px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header .like-wrapper {\r\n  background: #1690e5;\r\n  border-radius: 15px;\r\n  width: auto;\r\n  padding: 6px 10px 7px 10px;\r\n  position: absolute;\r\n  top: 20px;\r\n  right: 20px;\r\n  cursor: pointer;\r\n  font-size: 12px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header .like-wrapper .heart {\r\n  display: inline-block;\r\n  font-size: 16px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header .like-wrapper .heart:hover {\r\n  transform: rotate(360deg);\r\n  transition: all 0.3s ease-in-out 0s;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header .like-wrapper .liked {\r\n  color: red;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header .like-wrapper #quote-likes {\r\n  display: inline-block;\r\n  padding-left: 7px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-header :hover {\r\n  background: #1a80c8;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-body {\r\n  margin: 40px 25px 10px 35px;\r\n  font-size: 50px;\r\n  font-weight: bold;\r\n  line-height: 54px;\r\n}\r\n.page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-footer {\r\n  position: absolute;\r\n  bottom: 10px;\r\n  font-size: 14px;\r\n  font-weight: bold;\r\n  margin: 20px 25px 10px 35px;\r\n}\r\n.page-wrapper .inner-background .quote-container :after {\r\n  content: \"\";\r\n  display: block;\r\n  clear: both;\r\n}\r\n\r\n@media (max-width: 630px) {\r\n  .page-wrapper .inner-background .quote-container .quote-details-wrapper #quote-body {\r\n    font-size: 35px;\r\n    line-height: 45px;\r\n  }\r\n}<\/pre>\n<p>3. Finally, add the following JavaScript code and done.<\/p>\n<pre class=\"prettyprint linenums lang-js\">(function() {\r\n  \/\/ wrap in an IIFE \r\n  \/\/ -- keeps from clashing with other applications\/libraries\r\n  \/\/ -- prevents polluting the global scope\r\n\r\n  \/\/ used to get a random quote. Should be pulled in from some internal module library\r\n  function getRandomInt(min, max) {\r\n    return Math.floor(Math.random() * (max - min + 1)) + min;\r\n  }\r\n\r\n  \/\/ data for the quote browser. Would ideally come from an api, but I wanted control over my images\r\n  var data = [{\r\n    \"author\": \"Hodor\",\r\n    \"quote\": \"Hold the door.\",\r\n    \"image\": \"http:\/\/vignette3.wikia.nocookie.net\/gameofthrones\/images\/1\/18\/Season_6_hodor_main.jpg\/revision\/latest?cb=20160617020835\",\r\n    \"likes\": \"1032\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Abraham Lincoln\",\r\n    \"quote\": \"No man has a good enough memory to be a successful liar.\",\r\n    \"image\": \"https:\/\/media1.britannica.com\/eb-media\/34\/78134-004-8587374E.jpg\",\r\n    \"likes\": \"422\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Tyrion Lannister\",\r\n    \"quote\": \"Once you\u00e2\u20ac&#x2122;ve accepted your flaws, no one can use them against you.\",\r\n    \"image\": \"https:\/\/upload.wikimedia.org\/wikipedia\/en\/5\/50\/Tyrion_Lannister-Peter_Dinklage.jpg\",\r\n    \"likes\": \"2042\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Elon Musk\",\r\n    \"quote\": \"Dichotomy between sense of wonder and what is wrong.\",\r\n    \"image\": \"http:\/\/esq.h-cdn.co\/assets\/cm\/15\/11\/550344283c14e_-_esq-elon-musk-1212-de.jpg\",\r\n    \"likes\": \"315\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Victor Hugo\",\r\n    \"quote\": \"When a woman is talking to you, listen to what she says with her eyes.\",\r\n    \"image\": \"https:\/\/encrypted-tbn2.gstatic.com\/images?q=tbn:ANd9GcSb0VH1V4SYsuo_LOiznZZbMqKP5AKG1yT0b4Y5kIQIQ1eUKQrp\",\r\n    \"likes\": \"432\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Elon Musk\",\r\n    \"quote\": \"There's skepticism about anything new. That's normal.\",\r\n    \"image\": \"http:\/\/esq.h-cdn.co\/assets\/cm\/15\/11\/550344283c14e_-_esq-elon-musk-1212-de.jpg\",\r\n    \"likes\": \"175\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Ralph Waldo Emerson\",\r\n    \"quote\": \"Nothing great was ever achieved without enthusiasm.\",\r\n    \"image\": \"https:\/\/s-media-cache-ak0.pinimg.com\/236x\/a2\/f3\/91\/a2f391f3943a5626a3f4641755c4a9e8.jpg\",\r\n    \"likes\": \"121\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Victor Hugo\",\r\n    \"quote\": \"Initiative is doing the right thing without being told.\",\r\n    \"image\": \"https:\/\/encrypted-tbn2.gstatic.com\/images?q=tbn:ANd9GcSb0VH1V4SYsuo_LOiznZZbMqKP5AKG1yT0b4Y5kIQIQ1eUKQrp\",\r\n    \"likes\": \"43\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Seth Godin\",\r\n    \"quote\": \"Defenseless is the best choice for those seeking to grow.\",\r\n    \"image\": \"http:\/\/www.therisetothetop.com\/wp-content\/uploads\/2011\/11\/SethGodin.jpg\",\r\n    \"likes\": \"222\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Victor Hugo\",\r\n    \"quote\": \"There is nothing more powerful than an idea whose time has come.\",\r\n    \"image\": \"https:\/\/encrypted-tbn2.gstatic.com\/images?q=tbn:ANd9GcSb0VH1V4SYsuo_LOiznZZbMqKP5AKG1yT0b4Y5kIQIQ1eUKQrp\",\r\n    \"likes\": \"111\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Seth Godin\",\r\n    \"quote\": \"Ship often. Ship lousy stuff, but ship. Ship constantly.\",\r\n    \"image\": \"http:\/\/www.therisetothetop.com\/wp-content\/uploads\/2011\/11\/SethGodin.jpg\",\r\n    \"likes\": \"111\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Oscar Wilde\",\r\n    \"quote\": \"Experience is simply the name we give our mistakes.\",\r\n    \"image\": \"http:\/\/www.wilde-online.info\/images\/oscar-wilde-p1.jpg\",\r\n    \"likes\": \"22\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Oscar Wilde\",\r\n    \"quote\": \"Work is the curse of the drinking classes.\",\r\n    \"image\": \"http:\/\/www.wilde-online.info\/images\/oscar-wilde-p1.jpg\",\r\n    \"likes\": \"67\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Victor Hugo\",\r\n    \"quote\": \"He who opens a school door, closes a prison.\",\r\n    \"image\": \"https:\/\/encrypted-tbn2.gstatic.com\/images?q=tbn:ANd9GcSb0VH1V4SYsuo_LOiznZZbMqKP5AKG1yT0b4Y5kIQIQ1eUKQrp\",\r\n    \"likes\": \"335\",\r\n    \"has_liked\": 0\r\n  }, {\r\n    \"author\": \"Alan Watts\",\r\n    \"quote\": \"A person who never made a mistake never tried anything new.\",\r\n    \"image\": \"https:\/\/probaway.files.wordpress.com\/2013\/06\/watts_alan_2.jpg\",\r\n    \"likes\": \"344\",\r\n    \"has_liked\": 0\r\n  }];\r\n\r\n  var options = {\r\n    imgDomElement: \"quote-image\",\r\n    quoteDomElement: \"quote-body\",\r\n    authorDomElement: \"quote-author\",\r\n    likeDomElement: \"quote-likes\"\r\n  };\r\n\r\n  var quoteBrowser = function(data, elements) {\r\n    this.domElements = elements;\r\n    this.quotes = data;\r\n    this.currentQuoteIndex = 0;\r\n    this.bindedElements = {};\r\n    \r\n    this.bindedElements.img = document.getElementById(this.domElements.imgDomElement);\r\n    this.bindedElements.quote = document.getElementById(this.domElements.quoteDomElement);\r\n    this.bindedElements.author = document.getElementById(this.domElements.authorDomElement);\r\n    this.bindedElements.likes = document.getElementById(this.domElements.likeDomElement);    \r\n  };\r\n\r\n  quoteBrowser.prototype.incrementCurrentQuoteLikes = function() {\r\n    var currentQuote = this.quotes[this.currentQuoteIndex];\r\n\r\n    if (!currentQuote.has_liked) {\r\n      currentQuote.likes++;\r\n      currentQuote.has_liked = 1;\r\n    } else {\r\n      currentQuote.likes--;\r\n      currentQuote.has_liked = 0;\r\n    }\r\n\r\n    this.setQuote(currentQuote);\r\n  };\r\n\r\n  quoteBrowser.prototype.scrollQuote = function(direction) {\r\n    var currentIndex = this.currentQuoteIndex;\r\n\r\n    if (direction === 'prev') currentIndex--;\r\n    else currentIndex++;\r\n\r\n    \/\/ Check the limits. If goes below 0, wrap around to last element.\r\n    if (currentIndex &gt;= this.quotes.length) currentIndex = 0;\r\n    else if (currentIndex &lt; 0) currentIndex = this.quotes.length - 1;\r\n\r\n    \/\/ update current index on class\r\n    this.currentQuoteIndex = currentIndex;\r\n\r\n    \/\/ set current quote to the prev or next\r\n    this.setQuote(this.quotes[currentIndex]);\r\n  };\r\n\r\n  quoteBrowser.prototype.init = function() {\r\n    var prevArrow = document.getElementById(\"move-left\")\r\n    var nextArrow = document.getElementById(\"move-right\");\r\n    var likeButton = document.getElementsByClassName(\"like-wrapper\")[0];\r\n\r\n    \/\/ cannot use 'this' inside onclick handlers since they have a different context\r\n    var browser = this;\r\n\r\n    if (prevArrow.addEventListener) {\r\n      prevArrow.addEventListener('click', function() {\r\n        browser.scrollQuote('prev')\r\n      }, false);\r\n\r\n      nextArrow.addEventListener('click', function() {\r\n        browser.scrollQuote('next')\r\n      }, false);\r\n\r\n      likeButton.addEventListener('click', function() {\r\n        browser.incrementCurrentQuoteLikes()\r\n      }, false);\r\n    } else if (prevArrow.attachEvent) {\r\n      prevArrow.attachEvent('onclick', function() {\r\n        browser.scrollQuote('prev')\r\n      });\r\n\r\n      nextArrow.attachEvent('onclick', function() {\r\n        browser.scrollQuote('next')\r\n      });\r\n\r\n      likeButton.attachEvent('onclick', function() {\r\n        browser.incrementCurrentQuoteLikes()\r\n      });\r\n    }\r\n\r\n  };\r\n\r\n  \/\/ getRandomQuote returns a quote from random index\r\n  quoteBrowser.prototype.getRandomQuote = function() {\r\n    var random = getRandomInt(0, this.quotes.length - 1);\r\n    this.currentQuoteIndex = random;\r\n\r\n    return this.quotes[random];\r\n  };\r\n\r\n  \/\/ setQuote sets the data for this quote\r\n  quoteBrowser.prototype.setQuote = function(quoteObj) {\r\n    \/\/ set each of the dom elements to the data\r\n    \/\/ use stored elements for each part of quote instead of looking them up each time\r\n    this.bindedElements.img.src = quoteObj.image;\r\n    this.bindedElements.quote.innerHTML = quoteObj.quote;\r\n    this.bindedElements.author.innerHTML = quoteObj.author;\r\n    this.bindedElements.likes.innerHTML = quoteObj.likes;\r\n    \r\n    var heartDiv = document.getElementsByClassName(\"heart\")[0];\r\n\r\n    \/\/ start by removing the liked for this quote\r\n    heartDiv.classList.remove(\"liked\");\r\n\r\n    \/\/ color the heart if they have already liked\r\n    if (quoteObj.has_liked) heartDiv.classList.add(\"liked\");\r\n  };\r\n\r\n  document.addEventListener(\"DOMContentLoaded\", function() {\r\n    \/\/ Content has loaded\r\n    var qb = new quoteBrowser(data, options);\r\n    var randomQuote = qb.getRandomQuote();\r\n\r\n    qb.setQuote(randomQuote);\r\n    qb.init();\r\n  }, false);\r\n\r\n})();<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully integrated this quotes slideshow code snippet into your project. If you have any questions or are facing any issues, please feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to create a quotes slideshow with images. It comes with a decent interface to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6513,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59],"tags":[],"class_list":["post-6501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-carousel"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Quotes Slideshow with Images &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Quotes Slideshow with Images &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T16:46:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T09:47:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Quotes Slideshow with Images\",\"datePublished\":\"2024-01-11T16:46:00+00:00\",\"dateModified\":\"2024-01-22T09:47:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\"},\"wordCount\":114,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png\",\"articleSection\":[\"Carousel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\",\"url\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\",\"name\":\"JavaScript Quotes Slideshow with Images &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png\",\"datePublished\":\"2024-01-11T16:46:00+00:00\",\"dateModified\":\"2024-01-22T09:47:18+00:00\",\"description\":\"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png\",\"width\":1280,\"height\":960,\"caption\":\"JavaScript Quotes Slideshow with Images\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Carousel\",\"item\":\"https:\/\/codehim.com\/category\/carousel\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Quotes Slideshow with Images\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Quotes Slideshow with Images &#8212; CodeHim","description":"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Quotes Slideshow with Images &#8212; CodeHim","og_description":"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.","og_url":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-11T16:46:00+00:00","article_modified_time":"2024-01-22T09:47:18+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Quotes Slideshow with Images","datePublished":"2024-01-11T16:46:00+00:00","dateModified":"2024-01-22T09:47:18+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/"},"wordCount":114,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png","articleSection":["Carousel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/","url":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/","name":"JavaScript Quotes Slideshow with Images &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png","datePublished":"2024-01-11T16:46:00+00:00","dateModified":"2024-01-22T09:47:18+00:00","description":"Here is a lightweight JavaScript code snippet to create quotes slideshow with images. You can view demo and download source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/05\/JavaScript-Quotes-Slideshow.png","width":1280,"height":960,"caption":"JavaScript Quotes Slideshow with Images"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/carousel\/javascript-quotes-slideshow-with-images\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Carousel","item":"https:\/\/codehim.com\/category\/carousel\/"},{"@type":"ListItem","position":3,"name":"JavaScript Quotes Slideshow with Images"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":4156,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=6501"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/6513"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=6501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=6501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=6501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}