0

i need some help. I am using wp_localize_script in my Wordpres_Plugin. Inthe documentready-function i use this Code to bring the Message up:

$('#button-setup-league').click(function() 
{
$( "#dialog p" ).append('<span>'+wpslm_v_script_vars.delete_league+'</span>');
            $( "#dialog" ).dialog({ 
                modal: true
            }); 
});

The Situation is, that in Wordpress 3.4 it runs very well with no Problems.

But under Wordpress 3.2 there are all the HTML-Tags like <strong> or <br /> in the Messagebox visible. If i look in the Sourcecode, everything looks very good.

WP 3.2 runs jQuery 1.4 and WP 3.4 runs jQuery 1.7. Does this maybe effect the outputs?

Any help is very appreeciated. Thank you all

0

It's sort of a longshot, but maybe try something like this:

$('#button-setup-league').click(function() 
{
$( "#dialog p" ).html('<span>'+wpslm_v_script_vars.delete_league+'</span>');
            $( "#dialog" ).dialog({ 
                modal: true
            });
});

This, of course, requires "#dialog p" to be initially empty, or assumes that its contents can be replaced entirely. If not, maybe you can use the solution above but with a more specific selector (i.e. "#dialog p span.insert_after", or maybe $("#dialog p").last() or something; hard to say without actual code).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.