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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:54:49+00:00 2026-06-10T20:54:49+00:00

ive been working on a javascript slider the past few days and to this

  • 0

ive been working on a javascript slider the past few days and to this moment i have been stuck on how to make the div the slides into the page slide back off the page with a close button… i have found some code which i have tried to make to work but have been extremly unscussful in doing so.. here is the complete code i have put a comment next to the 2 parts of code i was trying to use to slide the div back off the screen..

<script type="text/javascript">
$(function(){
    $(".recordrow").click(function() {
    var divid = "details-" + $(this).attr('id').split("-")[1]; //Create the id of the div
    $("#"+divid).show().animate({ "left": '50.1%'}); //Bring the div from right to left with 200px padding from the screen

});

});
function closeRecord() { // this function
 $('#details').animate({right:-1000}, 500);
}
</script>



<div class="recordrow" id="row-1">
    <p>Matthew Gia </p>
    </div>

<div class="details" id="details-1">
   ... More details of the records
   <a href="#" id="bt-close" onclick="closeRecord(); return false;">Close</a> //this button

</div>
<div class="details" id="details-2">
   ... More details of the records

</div>

there is also this js fiddle

http://jsfiddle.net/matth4ck3r/aWMg6/2/

  • 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-10T20:54:51+00:00Added an answer on June 10, 2026 at 8:54 pm

    There is a scope issue in your code, you can remove the onclick attribute and try:

    $('#bt-close').click(function(e){
        $('.details').animate({right: "-=1000"}, 500);
        e.preventDefault()
    })
    

    http://jsfiddle.net/aWMg6/10/

    Also note that there is no element with id of details in your markup, it seems you want to select the elements by class names.

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

Sidebar

Related Questions

ive been working on c++ on linux for the past 2 years,and switched to
I've been working on this site for the past two weeks and everything has
I've been working almost exclusively on back-end tasks for the past few years, and
I've been working on a javascript library, and I have a lot of redundant
I've been working on updating my page using javascript/jquery and have now run into
Hello I've been working on a Javascript 8 slider puzzle (that is working including
I've been working a lot with JavaScript lately and have created some large function
I've been working on my problem for the past few hours and am at
I've been working on a tabbed navigation idea for the past few weeks. I'm
I've been working on this extensively for the past week and I can not

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.