dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
1
share rss forum feed


cdru
Go Colts
Premium,MVM
join:2003-05-14
Fort Wayne, IN
kudos:7
reply to DataDoc

Re: Need to let user select image for table cells

Quick and dirty way would be to setup each cell to have a fixed width and height. Assign a class, say "pattern1" to each cell. Create styles pattern1..patternn that has a background image of each of the patterns. Use jquery to assign a click event to each cell that cycles between patternx and patternx+1 cycling when n is reached.

Then to use it, she'd just need to click on each cell she wants to change, cycling between the images.


DataDoc
My avatar looks like me, if I was 2D.
Premium
join:2000-05-14
Martinsburg, WV
Reviews:
·Comcast
·Suddenlink
Thanks for the suggestions.

I've got a start to the page using 1 row and 4 styles, but after searching for jquery code to cycle images in a TD I'm stumped how to proceed.
<html>
<head>
 
<style type="text/css">
.image1 { background-image: url(Red.jpg); width: 60; height: 60}
.image2 { background-image: url(White.jpg); width: 60; height: 60}
.image3 { background-image: url(Tan.jpg); width: 60; height: 60}
.image4 { background-image: url(Brown.jpg); width: 60; height: 60}
</style>
 
</head>
<body>
 
<table class="imagetable">
<tr>
<td class="image1"></td><td class="image1"></td><td class="image1"></td><td class="image1"></td><td class="image1"></td><td class="image1"></td><td 
 
class="image1"></td>
</tr>
</table>
 
</body>
</html>
 

--
"Executive orders" or rule by fiat. You decide.