0
Problem: I mount a news modal with properties of an object, however, in the title property of the object I need to pass the number of views dynamically, and need to change the source of the number of views. What happens is that when the user hovers over the title, the style I applied appears, IE, HTML code appears for the end user
EXAMPLE
config = {
title: (data.nmcategoria || 'Geral') + ' | ' + data.dtpublicacao + ' | ' + data.nmtitulo + '<h6 style="line-height:7px;">' + data.nrvisualizacao + ' visualizações' + '</h6>',
content: tpl,
isConfirm: false,
titleElippsis: true,
modalHeight: 568,
modalWidth: 1024,
justText: true
The idea I had to solve this was to take the title property of the object, and change the styles with jquery and css, something like this:
var pegaObj = $(config).attr('title', 'style', 'line-height:7px;');
but without success, some tip galera?
let me get this straight, do you want to change Stylo when the condition changes correctly? I believe this will help you: http://api.jquery.com/css/
– Lodi
Every time the user opens the modal, the number of views appears, until then correct. However, as I changed the style in title, every time the cursor goes over the title appears HTML code for the user to see. I’ll take a look at that documentation
– Bruno Elias de Souza