jquery link color issue with firefox with .html() -


so have code:

<a id="baby" href="#" style="display:inline-block;color:#373529;"> <div id="yea" class="like-num">yeaaaaaaa</div> </a> 

with css

a {  color: #1a5790;  }  * {  color: #1a5790;  }  .like-num{   color:#373529;   } 

so link color in link supposed blackish though default link css blue. , works, link color did become blackish.

but call jquery ajax call on success replace #yea returned data, so

$('#yea').html(data); 

but when data replace completed, link color turns blue though before black, , happens in firefox, not in ie or chrome

does know how can modify code link color stays black after data replaced:

thanks in advance!

there no spoon

-the matrix

you cannot have block element (div) inside inside element (span). invalid html.

you can change div span , provide span style display: block show block element. valid.

even better: can add display: block a well. when that, don't need element inside a, , solve problem.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -