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 8160489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:15:30+00:00 2026-06-06T18:15:30+00:00

I am a newbie in jscript and jquery. I am creating a website, which

  • 0

I am a newbie in jscript and jquery. I am creating a website, which needs to open modal dialog on clicking on hyper links.

In a sample code (from a website) I saw that, it is using something like this:

<a id="SendToFriend" class="button send" href="#modalTellAFriend" rel="modal" data-closetext="Close">

content=jQuery(div#modalTellAFriend)closetext="Fermer"
<span>Send</span>
</a>

So, basically, I can add the the like this:

<div id="first modal">
</div>

<div id="second modal">
</div>

Now, the simple qn, how do I write the jQuery function for achieving this? I would like to use validate and form for the modal screen as well

  • 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-06-06T18:15:32+00:00Added an answer on June 6, 2026 at 6:15 pm

    You can use the jQuery UI library to create modal dialogs http://jqueryui.com/demos/dialog/#modal

    opening different dialogs for different rel attributes could be done like this:

    $('a[rel="modal_1"]').click(function(){
      $( "#first_modal" ).dialog({
        closeText : 'Fermer',
        modal: true
      });
    });
    
    $('a[rel="modal_2"]').click(function(){
      $( "#second_modal" ).dialog({
        closeText : 'Fermer',
        modal: true
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie jquery: does the .css() function alter css properties of an element if the
Newbie here, I have a struct for a word, which contains a char array
Newbie here (to C, objective-C, and iOS)... For this code in my AppDelegate.m, why
newbie doing Java homework here. I have one class named Album which contains the
Newbie still learning, been trying to search and hack code together for hours now,
Newbie here. I am looking at company code. It appears that there are NO
Newbie asking for help: I have an array of numbers that needs to be
Newbie question :o) I'm trying to generate a horizontal line with jQuery Draggable objects
Newbie here...can I write one program which incorporates .NET LINQ and also various Java
Newbie question on Rails 3 development. I am creating my first app and planning

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.