palAlaa
palAlaa

Reputation: 9858

Html code inside jquery dialog

how can I load HTML code in separated HTML file into dialog in another file. when I click into anchor in one.html page, dialog appears containing HTML code exist in another HTML page.

I didn't make the code that appear in the dialog in the same page, because I will use this code into another places.

Upvotes: 0

Views: 254

Answers (1)

wezzy
wezzy

Reputation: 5935

you can read your code using ajax

jQuery.get('second.html', function(html){
    $('#dialog').html(html).dialog();
})

This should work using jQuery and jQuery UI for dialog

Hope this helps

Upvotes: 1

Related Questions