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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:52:45+00:00 2026-05-30T15:52:45+00:00

I need to rewrite this on function to a click function. with the exact

  • 0

I need to rewrite this on function to a click function. with the exact same functionality.
I cant use on since I have to use jQuery 1.3

$('#citybreak_availability_calendar_widget').on('click', '#CB_SearchButton', function() {
    var iframe = $('#citybreakContent').find('iframe');
    iframe.attr('src', $(this).attr('href'));
    $('#menu ul li a[title="Boka rum"]').click();
    return false;
});

And this is what I got:

$('#citybreak_availability_calendar_widget #CB_SearchButton').click(function() {
    var iframe = $('#citybreakContent').find('iframe');
    iframe.attr('src', $('#CB_SearchButton').attr('href'));
    $('#menu ul li a[title="Boka rum"]').click();
    return false;
});
  • 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-30T15:52:47+00:00Added an answer on May 30, 2026 at 3:52 pm

    Here:

    $( '#citybreak_availability_calendar_widget' ).click( function ( e ) {
        if ( e.target.id === 'CB_SearchButton' ) {
            // your code
        }
    });
    

    Since you use version 1.3 which doesn’t provide event delegation out-of-the-box, you’ll have to implement it manually. The idea is to bind the click handler to the wrapper element, and then – inside the handler – manually check if the event target – the e.target property – is the correct element.

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

Sidebar

Related Questions

I need to rewrite this query and I'm not allowed to use a subquery.
How can I rewrite this code without using jQuery? I need to do it
Rewrite this program to use a function for each of the ways you're printing
I need rewrite this url http://adresa.com/article.php?act=view&id=1113 to http://adresa.com/view/1113 I make it with mod_rewrite in
i have a mixed aspx/MVC webapp project and need to rewrite incoming URL's either
Here is a simplified version of the code I use. I need to rewrite
I need to use mod_rewrite to redirect http://www.site.com/new_cars/cars.php?make=brandname to have a friendlier url of
When I need to rewrite a function in an observer located in the Enterprise
I cannot, for the life of me, think of any need for this function.
I have pretty much the same Ajax Request call but I need to expand

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.