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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:02:36+00:00 2026-05-18T12:02:36+00:00

I am struggling with jQuery for a long time now. It is very powerful

  • 0

I am struggling with jQuery for a long time now. It is very powerful and there are lot of great things we can do with jQuery.

My problem is that I use a lot of jQuery features at the same time. E.g. I have a site that displays items, 12 items per page and I can paginate through the pages using jQuery. On the same page I implemented a thumpsUp button that uses jQuery too.

The more jQuery features I use, the harder it gets to arrange them properly. E.g.:

$(document).ready(function() {
 $(".cornerize").corner("5px"); //cornerize links
 $('a#verd').live('click', exSite); //open iframe
 $("a.tp").live('click', thumpsUp); //thumps up
 $("a#next").click(getProgramms); //next page
 $("a#previous").click(getProgramms); //previous page
    //for the current page reload the content
 $("a#page").each(function() {
  $(this).click(getProgramms);
 });
 //this isn't working...
 $('.smallerpost').live('click', alert('test'));
});

Have a look at the last code line. I want to perform an alert when the div element is clicked. Instead of doing so the page shows me the alert when I refresh the page. A click on the div has no effect.

What am I doing wrong? What would be a strategy here to have clean and working jQuery?

  • 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-18T12:02:37+00:00Added an answer on May 18, 2026 at 12:02 pm

    Change that line to

    $('.smallerpost').live('click', function () {
        alert('test');
    });
    

    and while you’re there…

    $("a#page").each(function() {
        $(this).click(getProgramms);
    });
    

    has exactly the same effect as:

    $('a#page').click(getProgramms);
    

    … but technically there should be only one element with id=’page’ anyway

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

Sidebar

Related Questions

I'm struggling with the following problem. I use the jQuery autocomplete plugin to get
I'm struggling to build a simple zend framework application that can call jQuery. So,
I have been struggling with this for quite some time now. jQuery.ajax in the
Been struggling with this simple selector problem a couple of hours now and must
I'm fairly new to jquery and struggling with something that should be fairly simple.
the jquery datepicker is not work in usercontrol through the masterpage....struggling a lot..... masterpage
I'm really struggling trying to use the jQuery UI autocomplete plugin. I've had a
i'm struggling with converting a menu from mootools to jquery. there are various reasons
When using the jQuery.ajax() method, I am struggling to filter the data that is
This should be quite a simple problem, I've come across it enough that there

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.