[Beye] quote 3rd level!

Game development with Board Game Arena Studio
Post Reply
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

[Beye] quote 3rd level!

Post 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>';

User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: [Beye] quote 3rd level!

Post 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;
}
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: [Beye] quote 3rd level!

Post 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
Post Reply

Return to “Developers”