Page 1 of 1

[Beye] quote 3rd level!

Posted: 04 April 2013, 21:30
by Rudolf
Bonjour, I don't know how to insert quotes on 3rd level... I mean replace the brakets in following code by quotes...
I've tryed: \&quote " "" ' and \\&quote
none of these trials works, could anybody give the right solution

Code: Select all

var jstpl_player_board = 
'<div class="cp_board">\
	<div id="icon_p${id}"\
	onmouseover="style.borderColor= [#FFFFFF] "\
	onmouseout="style.borderColor=  [#8B4513] "\ 				
	class="stylemovecardinplayerbox">\
	</div>\
</div>';


Re: [Beye] quote 3rd level!

Posted: 05 April 2013, 18:23
by pikiou
Try \'

Code: Select all

var jstpl_player_board = 
'<div class="cp_board">\
   <div id="icon_p${id}"\
   onmouseover="style.borderColor= \'#FFFFFF\'"\
   onmouseout="style.borderColor=  \'#8B4513\'"\             
   class="stylemovecardinplayerbox">\
   </div>\
</div>';
But really inline JS code shouldn't be used, especially to do CSS stuff. Better use CSS directly:

Code: Select all

var jstpl_player_board = 
'<div class="cp_board">\
   <div id="icon_p${id}"\
   class="stylemovecardinplayerbox">\
   </div>\
</div>';
Then in your CSS:

Code: Select all

.stylemovecardinplayerbox {
   border-color: #8B4513;
}
.stylemovecardinplayerbox:hover {
   border-color: #FFFFFF;
}

Re: [Beye] quote 3rd level!

Posted: 05 April 2013, 18:50
by Rudolf
pikiou wrote:Try \'
thanks pikiou but I already tried, it seems like \ were considered immediatly as a follow o next line.
I don't use CSS in this case, because I would like at it as a parameter in a future version.... by the way... I will put it in CSS