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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:10:20+00:00 2026-06-17T12:10:20+00:00

I used this jquery to move a div by every click. $(document).ready(function(){ $(‘#hero’).click(function(){ $(this).animate({

  • 0

I used this jquery to move a div by every click.

$(document).ready(function(){
    $('#hero').click(function(){
        $(this).animate({
            left: '+=50px'
    },300);
    })
})

I’d like to avoid jquery whenever it is possible to get deeper into pure JS.

Is there anyway to achieve the same effect without using jquery?

I know that this will be more complex, but just trying to learn.

  • 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-17T12:10:21+00:00Added an answer on June 17, 2026 at 12:10 pm

    you can use the same technique in javascript:

    // get the object refrence
    var hero_obj = document.getElementById('hero');
    
    // attach the onclick event
    hero_obj.onclick = function(){ 
        this.style.left = ( parseInt(this.style.left, 10) + 50 ) + 'px' 
    };
    

    However, the effect won’t be as smooth as jquery

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

Sidebar

Related Questions

I've used this useful JQuery function that serializes nested elements. the problem is how
i used this script to animate some divs with jquery and css. now i
I tried to investigate the jQuery code, so I used this: document.write($.constructor); jsfiddle I
I used to use this script for jquery email obfuscation: $(.replaceAt).replaceWith(@); $(.obfuscate).each(function () {
I used a code: jQuery.fn.MyFunction = function(){ return this.each(function() { attributes = test; return
I used this script to create a jQuery accordion. Check out the working jsFiddle
I originally used JQuery for this project, but now I'm having to use Prototype,
I have used autocomplete in jQuery from this link . In the normal browser
this code in my plugin used to work just fine: jQuery('#embedded_obj', context).get(0).getVersion(); and the
$(document).ready(function() { var $clickable_pieces = $('.chess_piece').parent(); $($clickable_pieces).addClass('selectee'); // add selectee class var $selectee =

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.