Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.html() jQuery method bizzare bug - resolves to empty space locally, but not on production

I'm making a simple jquery command:

element.html("                 ");

using the attributes/html method: http://docs.jquery.com/Attributes/html

It works on my local app engine server, but it doesn't work once I push to the Google server. The element empties but doesn't fill with spaces.

So instead of " " (6 spaces) it's just "".

Once again, this is running on App Engine, but I don't think that should matter...

like image 884
jamtoday Avatar asked Nov 18 '25 21:11

jamtoday


1 Answers

You could try generating the space during run-time, so it won't be trimmed or whatever happens during transport:

element.html(String.fromCharCode(32));
like image 176
davil Avatar answered Nov 20 '25 13:11

davil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!