imran khan
imran khan

Reputation: 1

How to show a div infront of a menu while clicking on the home contact blog and services page?

Web developer

Its loving to see such kind of effects on the screen i am in love with css 3d dimensions its feel like i am in 3D space and creating it so much fun man loved it and gonna be doing this liking

$(document).ready(function(){ $("#contact").click(function(){ $(".content").load("contact.html .data"); }); $("#about").click(function(){ $(".content").load("about.html .data"); }); $("#blog").click(function(){ $(".content").load("blog.html .data"); }); $("#services").click(function(){ $(".content").load("services.html .data"); }); });

Upvotes: 0

Views: 30

Answers (1)

竹内 智則
竹内 智則

Reputation: 51

You can use SessionStrage to save data and pull out it on other pages.

This works as Key-Value type storage. So you have to put key name and value

// Save Data
sessionStorage.setItem('UserName', 'Tom');

// Get Data (You can get your data in any page you want to get them after saving data)
var data = sessionStorage.getItem('UserName');
console.log(data);  // Display "Tom"

// Delete Data
sessionStorage.removeItem('UserName');

This SessionSotrage only works in a session. This means if the user closes the window, the data will be gone. So please use it when the data is temporary.

Upvotes: 0

Related Questions