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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:55:09+00:00 2026-05-25T22:55:09+00:00

I am creating a plugin for jQuery to create pretty select boxes (I know

  • 0

I am creating a plugin for jQuery to create pretty select boxes (I know there are some out there, but this is learning experience for me).

If all goes well I realease the plugin to the public, so I am trying to build it as flexible as possible, and for this reason I am struggling to select the parent form element that houses the select that I am trying to target. Regardless of how a user sets up there HTML, I want to be able to select the parent form element.

Below is my HTML,

    <div class="grid_6 alpha quick_search">
        <h3>Quick Search Talent</h3>
        <form action="http://urbantalent.tv.local/search/quick" method="post" accept-charset="utf-8" class="quick_form"><div style="display:none">
            <input type="hidden" name="csrf_urbantalent" value="a8db11249b37322da84d3a211a933b19" />
</div>
            <div class="formRow drop_down">
                <select name="type">
                    <option value="0" selected="selected">I'm looking for...</option>
                    <option value="1">actors</option>
                    <option value="2">presenters</option>
                    <option value="3">voice overs</option>
                </select>
             </div>
            <button type="submit" name="submit_search"><img src="http://urbantalent.tv.local/media/images/site/quick_submit.png" /></button>
        </form>
    </div>

As you can see from this HTML the selects parent is actually, .formRow how can I select the just the parent form, I have tried doing this,

$(this).parent('form') however this doesn’t work as we know that form is not actually the parent.

  • 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-25T22:55:10+00:00Added an answer on May 25, 2026 at 10:55 pm

    You need this:

    $(this).closest("form")
    

    jQuery reference: http://api.jquery.com/closest/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading some tutorials now about jQuery.. function creating,plugin creation etc. but these tutorials
I wanted to create jquery plugin & started off creating a sample jquery plugin...But
So I'm using this pretty standard jquery plugin pattern whereby you can grab an
I'm creating a jQuery plugin. So far it's working fine, but I'm having doubt
I searched for some nice easy to use jQuery tooltip plugin but couldn't found
i am using jqtransform plugin to create select input, i make some change in
I'm new to jQuery but want to use this form validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ In
I'm creating a jQuery plugin which adds some custom animations to an element and
Creating a slideshow jQuery plugin, but having trouble getting it to work with more
Ran into problem with creating custom select dropdown plugin in jQuery. I'm at the

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.