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

Posts : 346
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?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43948
Reputation : 3127
Language : English
Location : United States

http://fmthemesdesignteam.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
avatar
TamDonCo
Forumember

Posts : 346
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 when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2189
Reputation : 278
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
avatar
TamDonCo
Forumember

Posts : 346
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
avatar
TamDonCo
Forumember

Posts : 346
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



avatar
APE
Administrator
Administrator

Male Posts : 12735
Reputation : 1345
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 ?
avatar
TamDonCo
Forumember

Posts : 346
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.



avatar
APE
Administrator
Administrator

Male Posts : 12735
Reputation : 1345
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