Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:33:07+00:00 2026-05-28T18:33:07+00:00

I want to add some custom HTML between the buttons on a jQuery dialog

  • 0

I want to add some custom HTML between the buttons on a jQuery dialog box (specifically a span that contains the word “or”).

The Javascript I have is something like this:

$("#foo").dialog({
    autoOpen: false,
    width: 600,
    modal: true,
    resizable: false,
    buttons: {
        save: { text: 'Save', class: 'form-finish form-submit', click: function() {
                …
            }
        },
        cancel: { text: 'Cancel', class: 'form-cancel', click: function() {
            $( this ).dialog( "close" );
            }
        }
    }
});

The HTML it produces is this:

<button class="form-finish form-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Save</span></button>
<button class="close cancel ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Cancel</span></button>

What I want is this:

<button class="form-finish form-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Save</span></button>
<span class="article">or</span>
<button class="close cancel ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false"><span class="ui-button-text">Cancel</span></button>

Is there any way to do this without hacking jQuery UI’s core? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:33:07+00:00Added an answer on May 28, 2026 at 6:33 pm

    Do something like this after you create dialog?

      $(".form-finish").after("<span class='article'>or</span>");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that I want to add some custom drawing to. I
Is there some method that accepts inserting custom html without having to actually add
I want to add some jQuery functionality to our sites where one piece of
I want to add some html in an email. I've tried the following. vFromName
I want to add some classes to a CodeIgniter project that aren't models, views,
I want to add some style to head tag in html page using javascript.
I am using the jQuery FullCalendar ( http://arshaw.com/fullcalendar/docs/ ). I want to add some
Which browsers (and versions) do not support custom attributes? I want to add some
I am trying to create a custom HTML Helper that encapsulates some presentation logic
Sometimes I want to add some custom CSS or Javascript to a page but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.