I have successfully implemented a feature carousel slider using the jquery.featured.carousel.js file along with some CSS.
Here is the jsfiddle link to my project: LINK.
When running this code on localhost, I noticed that I need to refresh the page every time in order to get a responsive view when resizing the window.
Below is the JavaScript code I am utilizing:
<script type="text/javascript">
$(document).ready(function() {
initSlider();
});
$(window).resize(function() {
initSlider();
});
function initSlider() {
// Large block of conditional statements for setting carousel options based on window width
}
</script>
In my code, there is a specific section:
$(window).resize(function() {
initSlider();
});
I removed this section and found that the functionality remained the same.
Note: Due to limitations, I cannot utilize CSS media queries for achieving a responsive layout with this carousel.
I would appreciate any ideas or suggestions on how to modify the code to achieve a responsive design without needing to refresh the page constantly.
Thank you.