Change image individually
4 posters
Page 1 of 1
Change image individually
Hi
Is it possible to change image individually, not all
Example
I have same image in 4 rows, suppose I want to change one them such as row 2
I use this code but it changes all of them
it does not work but if I take out "no-repeat" , it works but change all 4 rows
Is it possible to change image individually, not all
Example
- Code:
<li class="row row1" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');</dl></li>
<li class="row row1" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');</dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');</dl></li>
I have same image in 4 rows, suppose I want to change one them such as row 2
I use this code but it changes all of them
- Code:
for ( var i = 0, r = document.getElementsByClassName('row'); i < r.length; i++ ) {
if (i ==2) {
$(".icon").css({"background-image" : "url(http://2img.net/s/t/20/71/96/i_folder_new_hot.gif)", no-repeat });
}
}
it does not work but if I take out "no-repeat" , it works but change all 4 rows
Re: Change image individually
What is this used for? Could you post a screenshot of it in action?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Change image individually
SLGray wrote:What is this used for? Could you post a screenshot of it in action?
I would like to change "mark read" icon for specific topic I do not want to read
for example, I want to "mark read" icon for topic 7550 automatically
Re: Change image individually
I checked your coding and there were a few syntax errors. Try these.
- Code:
<li class="row row1" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row1" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://2img.net/s/t/20/71/96/i_folder.gif');"></dl></li>
- Code:
for (var i = 0, r = document.getElementsByClassName("row"); i < r.length; i++) {
if (i == 2) {
$(".icon").css({"background-image": "url(http://2img.net/s/t/20/71/96/i_folder_new_hot.gif) no-repeat"});
}
}
Re: Change image individually
Since no solution, I found different way
Mod : Please delete this topic
Thank You
Mod : Please delete this topic
Thank You
Re: Change image individually
Hello we do not delete your topic but just put it in the trash but maybe if you give it a little more time maybe @Draxion will come back and help you more or maybe some one else will.
regards APE
regards APE
Re: Change image individually
APE wrote:Hello we do not delete your topic but just put it in the trash but maybe if you give it a little more time maybe @Draxion will come back and help you more or maybe some one else will.
regards APE
OK , Thank You
How do I put in trash or only mod can do it ?
Similar topics
» just change image
» Change the Image?
» change bookmarks image
» Text change in image
» Change image - Icon-> Done
» Change the Image?
» change bookmarks image
» Text change in image
» Change image - Icon-> Done
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum