Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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