Posts by Eliton Mendes de Sousa • 48 points
4 posts
-
2
votes1
answer141
viewsA: View html-formatted code from the database on a Javascript page
Your problem is you’re showing a string containing tags instead of code html for real. //O seu content está vindo algo assim: '<p>Isto é um parágrafo</p>' This way javascript understands…
-
0
votes1
answer41
viewsA: Image based on the content of a div
The best way to do this would be with Javascript. Following example: <div class="ccartist">A Flock of Seagulls</div> <div class="cover"><img src=""></div>…
-
0
votes1
answer23
viewsA: Modify innerhtml by
Change your code to look like this: var y = document.getElementById("carta"); var x = document.createElement("div"); //aqui você inicia uma variável que irá receber o código html do for var html;…
-
1
votes2
answers71
viewsA: How to prevent a function from being executed when a condition is reached and reactivate it when necessary?
Keeping the same structure you are using just do so: $(".inc-font").click($.aumentaFonte = function () { var size = $("#body-post").css('font-size').replace('px',''); //aqui você verifica se o…