I have an Image slider of 5 pics in Home page in a asp.net MVC application. Now when user will click on other tab within the application the last seen image of the image slider should be stored in session state. so when the user come back to the homepage,image slider will show the last seen image first. My chtml:
<div id="sliderFrame">
<div id="slider">
<a id="image1" href='#' class='linkdisabled'>
<img src="~/content/Internal/Images/image1.jpg" alt="" />
</a>
<a id="image2" href='#' class='linkdisabled'>
<img src="~/content/Internal/Images/image2.jpg" alt="" />
</a>
.....
.js file:
var sliderOptions=
{
sliderId: "slider",
startSlide:0,
effect: "series1",
effectRandom: false,
pauseTime: 2600,
transitionTime: 0
slices:12,
boxes: 8,
hoverPause:1,
autoAdvance: true,
captionOpacity: 0.3,
captionEffect: "fade",
thumbnailsWrapperID: "thumbs",
m: false,
license: "mylicense",
};
var imageSlider= new ImageSlider(sliderOptions);
function ImageSlider(k){for(var T=function(a){return document.getElementId(a)},d="length" ab="getElmentByTagName"....
I am thinking of overwriting images by ID in cookies and when user get back to homepage last stored image in the cookies will be shown in the image slide. But how to get the image id and store it into cookies? Please help.