Changing Table's Image [modified]
-
I want that when i will enter the TextA i will see on the third table pic b (Winter) and when i will enter TextB i will see on the third table pic c (Sunset) Please help !!! <%--When mouse will be over the text then i want the third table will show pic (Winter)--%>
ChangeToPicA -> The Text
<%--When mouse will be over the text then i want the third table will show pic (Sunset)--%>
ChangeToPicB -> The Text
<%--The third table which need to change the pictures--%>
JScript2.js function showPic(id) { document.getElementById("Sunset").className = "c"; document.getElementById("Winter").className = "b"; document.getElementById(id).className = "picshow"; } stylesheet.css .c { background-image: url('Sunset.jpg'); background-repeat:no-repeat; } .b { background-image: url('Winter.jpg'); background-repeat:no-repeat; } .pichide { display: none; } .picshow { display: block; border: 1px; } -- Modified Monday, August 1, 2011 9:18 AM
-
I want that when i will enter the TextA i will see on the third table pic b (Winter) and when i will enter TextB i will see on the third table pic c (Sunset) Please help !!! <%--When mouse will be over the text then i want the third table will show pic (Winter)--%>
ChangeToPicA -> The Text
<%--When mouse will be over the text then i want the third table will show pic (Sunset)--%>
ChangeToPicB -> The Text
<%--The third table which need to change the pictures--%>
JScript2.js function showPic(id) { document.getElementById("Sunset").className = "c"; document.getElementById("Winter").className = "b"; document.getElementById(id).className = "picshow"; } stylesheet.css .c { background-image: url('Sunset.jpg'); background-repeat:no-repeat; } .b { background-image: url('Winter.jpg'); background-repeat:no-repeat; } .pichide { display: none; } .picshow { display: block; border: 1px; } -- Modified Monday, August 1, 2011 9:18 AM
First, FORMAT your code snippets!!! Creating tables for one cell is extreme overkill.
Text A
Text Bspan, img
{
display:block;
}$(document).ready(function()
{
$("#text1").hover(function()
{
$("#pic").attr("src", "Sunset.jpg");
});
$("#text2").hover(function()
{
$("#pic").attr("src", "Winter.jpg");
});
});
I know the language. I've read a book. - _Madmatt
modified on Monday, August 1, 2011 9:25 AM
-
First, FORMAT your code snippets!!! Creating tables for one cell is extreme overkill.
Text A
Text Bspan, img
{
display:block;
}$(document).ready(function()
{
$("#text1").hover(function()
{
$("#pic").attr("src", "Sunset.jpg");
});
$("#text2").hover(function()
{
$("#pic").attr("src", "Winter.jpg");
});
});
I know the language. I've read a book. - _Madmatt
modified on Monday, August 1, 2011 9:25 AM