Change image individually

Go down

In progress Change image individually

Post by TamDonCo on June 2nd 2018, 5:42 pm

Hi

Is it possible to change image individually, not all

Example

Code:
<li class="row row1" ><dl class="icon" style="background-image:url('http://hitsk.in/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://hitsk.in/t/20/71/96/i_folder.gif');</dl></li>
<li class="row row1" ><dl class="icon" style="background-image:url('http://hitsk.in/t/20/71/96/i_folder.gif');</dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://hitsk.in/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://hitsk.in/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
TamDonCo
TamDonCo
Forumember

Posts : 416
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: Change image individually

Post by SLGray on June 2nd 2018, 10:10 pm

What is this used for?  Could you post a screenshot of it in action?


Change image individually Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 45914
Reputation : 3241
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

In progress Re: Change image individually

Post by TamDonCo on June 2nd 2018, 10:30 pm

@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
TamDonCo
TamDonCo
Forumember

Posts : 416
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: Change image individually

Post by Draxion on June 2nd 2018, 11:45 pm

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://hitsk.in/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://hitsk.in/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row1" ><dl class="icon" style="background-image:url('http://hitsk.in/t/20/71/96/i_folder.gif');"></dl></li>
<li class="row row2" ><dl class="icon" style="background-image:url('http://hitsk.in/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://hitsk.in/t/20/71/96/i_folder_new_hot.gif) no-repeat"});
  }
}


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as Change image individually Solved11 when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

Change image individually Draxio14
Draxion
Draxion
Support Moderator
Support Moderator

Male Posts : 2327
Reputation : 298
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

In progress Re: Change image individually

Post by TamDonCo on June 2nd 2018, 11:52 pm

THanks Draxion

No error but nothing happens
TamDonCo
TamDonCo
Forumember

Posts : 416
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: Change image individually

Post by TamDonCo on June 6th 2018, 2:45 pm

Since no solution, I found different way

Mod : Please delete this topic

Thank You
TamDonCo
TamDonCo
Forumember

Posts : 416
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: Change image individually

Post by APE on June 6th 2018, 6:40 pm

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


Change image individually Left1212Change image individually Center11Change image individually Right112
Change image individually Ape_b110
Change image individually Ape1010
APE
APE
Administrator
Administrator

Male Posts : 14524
Reputation : 1587
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Change image individually

Post by TamDonCo on June 6th 2018, 7:48 pm

@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 ?
TamDonCo
TamDonCo
Forumember

Posts : 416
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: Change image individually

Post by APE on June 6th 2018, 8:41 pm

only staff can do it.


Change image individually Left1212Change image individually Center11Change image individually Right112
Change image individually Ape_b110
Change image individually Ape1010
APE
APE
Administrator
Administrator

Male Posts : 14524
Reputation : 1587
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum