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

  • Home
  • SEARCH
  • 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 4111126
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:01:34+00:00 2026-05-20T22:01:34+00:00

Hey i found this pre-written jQuery script and im wondering if someone could do

  • 0

Hey i found this pre-written jQuery script and im wondering if someone could do me a big favour and show me where the script is so i can remove the layer over the post that it that redirects someone when clicked.. Thanks 🙂

Source code:

<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="jquery.scrollTo-1.4.2.js"></script>
    <script type="text/javascript">
        //when the DOM is ready 
        $(document).ready(function(){
            //settings on top
            var doindex = 'comments.php?item_id=';
            var initialPosts = <?php echo get_posts(0,$_SESSION['posts_start']); ?>;
            //function that creates posts
            var postHandler = function(postsJSON) {
                $.each(postsJSON,function(i,post) {

                    //post url
                    var postURL  = '' + doindex + post.item_id;
                    var id = 'post-' + post.ID;
                    //create the HTML
                    $('<div></div>')
                    .addClass('post')
                    .attr('id',id)
                    //generate the HTML
.html('<table width="244" height="101" border="0" cellpadding="0" cellspacing="2" ><tr>    <td height="24" colspan="2" bgcolor="#0270B7"><table width="410" border="0"><tr> <td width="404" height="20" class="username"><a href="../profile.php?user=' + post.username + '" class="username">&nbsp;' + post.username + '<span class="name">&nbsp;&nbsp;' + post.name + '</span></a></td></tr></table></td></tr><tr> <td width="51" bgcolor="#Edeff4"><span class="thum"><img src="' + post.thumnailpath + '" alt="" width="50" height="50" /></span></td><td width="355" height="50" bgcolor="#Edeff4" class="content">&nbsp;' + post.item_content  + '</td></tr><tr><td height="19" colspan="2" bgcolor="#Edeff4" class="content"><table width="404" border="0"> <tr class="post-title"><td width="171" height="28" class="links"> <a href="comment.php?id=' + post.item_id + '"  class="post-title">&nbsp;<span class="post-title">comment </span></a><a href="#"  class="post-title">(' + post.likecount + '</a><a href="comment.php?id=' + post.item_id + '"  class="post-title"><span class="post-title">)</span></a> <span class="post-title"><a href="#"  class="post-title">likes (' + post.likecount + ')</a></span></td><td width="223" >' + post.timeago + '</td></tr></table></td></tr></table>')



                    .click(function() {
                        window.location = postURL;
                    })
                    //inject into the container
                    .appendTo($('#posts'))
                    .hide()
                    .slideDown(250,function() {
                        if(i == 0) {
                            $.scrollTo($('div#' + id));
                        }
                    });
                }); 
            };
            //place the initial posts in the page
            postHandler(initialPosts);
            //first, take care of the "load more"
            //when someone clicks on the "load more" DIV
            var start = <?php echo $_SESSION['posts_start']; ?>;
            var desiredPosts = <?php echo $number_of_posts; ?>;
            var loadMore = $('#load-more');
            //load event / ajax
            loadMore.click(function(){
                //add the activate class and change the message
                loadMore.addClass('activate').text('Loading...');
                //begin the ajax attempt
                $.ajax({
                    url: 'jquery-version.php',
                    data: {
                        'start': start,
                        'desiredPosts': desiredPosts
                    },
                    type: 'get',
                    dataType: 'json',
                    cache: false,
                    success: function(responseJSON) {
                        //reset the message
                        loadMore.text('Load More');
                        //increment the current status
                        start += desiredPosts;
                        //add in the new posts
                        postHandler(responseJSON);
                    },
                    //failure class
                    error: function() {
                        //reset the message
                        loadMore.text('Oops! Try Again.');
                    },
                    //complete event
                    complete: function() {
                        //remove the spinner
                        loadMore.removeClass('activate');
                    }
                });
            });
        });
    </script>
</head>
  • 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-20T22:01:35+00:00Added an answer on May 20, 2026 at 10:01 pm

    Try taking this out:

    .click(function() {
      window.location = postURL;
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, my Computational Science course this semester is entirely in Java. I was
Hey right now I'm using jQuery and I have some global variables to hold
Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd)
Hey so what I want to do is snag the content for the first
Hey, I'm using Levenshteins algorithm to get distance between source and target string. also
Hey, I've been developing an application in the windows console with Java, and want
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my
Hey peoples, I've been studying Java for a couple of weeks, and have decided
Hey, in the Programming Pearls book, there is a source code for setting, clearing
Hey having some trouble trying to maintain transparency on a png when i create

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.