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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:43:31+00:00 2026-05-21T23:43:31+00:00

I have been searching for an answer for this for days and haven’t found

  • 0

I have been searching for an answer for this for days and haven’t found anything so sorry if this has been asked before.

I want the integer to go up by 1 every time this link is clicked. So first it is 0, then clicked its 1, then clicked its 2, then clicked its 3

document.getElementById('myPackage').href="http://www.vanquishvps.com/order/cart.php?a=confproduct&i="+1

I really have no idea how to do this, I have really tried looking at Jquerys variables and stuff, I just cant figure it out.

Id appreciate any help hugely!

Thank you

  • 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-21T23:43:32+00:00Added an answer on May 21, 2026 at 11:43 pm

    After looking at the site that you mentioned in your comment. This should work in your specific scenario:

    jQuery('#myPackage').click(function () {
      // Get the first 3 parts of link's href
      var hrefParts = jQuery('#myPackage')[0].href.split('=').slice(0,2);
    
      // Add the current slots value
      hrefParts.push(jQuery('.slots span').text())
    
      // Set the href to the new URL
      this.href = hrefParts.join('=');
    });
    

    Another solution would be to modify your existing setPackageData function and add these lines to the end of it. This solution would set the link to the package index, instead of the number of slots, and also does it whenever you change the slider, not just when you click the link:

    var myPackage = $('#myPackage')[0], hrefParts = myPackage.href.split('=').slice(0,2);
    hrefParts.push(index.toString());
    myPackage.href = hrefParts.join('=');
    

    Although you should have your developer look at it, she or he will probably come up with a more permanent solution 😉

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

Sidebar

Related Questions

I have been searching desperately for an answer to this question, but not found
I have been searching for an answer to this question for days and it
I have been searching for an answer to this question but cannot find anything
this question might have been answered before, but after two days of searching I
For the last two days I have been searching for an answer to this
I have been searching for an answer to this dilemma but found nothing. I
I have been searching for an answer to this for days, and while some
I have been searching for an answer to this for two days now, but
I have been searching the internet wildly for an answer to this question. We
I have been searching for an answer and trying out stuff for days now

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.