How to resolve a share HTML & JS code conflict2019 Community Moderator ElectionHow do JavaScript closures work?How to horizontally center a <div>?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How to check whether a checkbox is checked in jQuery?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?Why does HTML think “chucknorris” is a color?

Instead of Universal Basic Income, why not Universal Basic NEEDS?

Ban on all campaign finance?

Converting Functions to Arrow functions

Does the statement `int val = (++i > ++j) ? ++i : ++j;` invoke undefined behavior?

Informing my boss about remarks from a nasty colleague

Humanity loses the vast majority of its technology, information, and population in the year 2122. How long does it take to rebuild itself?

Science-fiction short story where space navy wanted hospital ships and settlers had guns mounted everywhere

Does this AnyDice function accurately calculate the number of ogres you make unconcious with three 4th-level castings of Sleep?

What is the greatest age difference between a married couple in Tanach?

Sword in the Stone story where the sword was held in place by electromagnets

Why are the outputs of printf and std::cout different

Why did it take so long to abandon sail after steamships were demonstrated?

An Accountant Seeks the Help of a Mathematician

PlotLabels with equations not expressions

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

Life insurance that covers only simultaneous/dual deaths

How can I change step-down my variable input voltage? [Microcontroller]

When do we add an hyphen (-) to a complex adjective word?

Dot in front of file

Does this property of comaximal ideals always holds?

How could a scammer know the apps on my phone / iTunes account?

How to deal with taxi scam when on vacation?

Use of プラトニック in this sentence?

How do I hide Chekhov's Gun?



How to resolve a share HTML & JS code conflict



2019 Community Moderator ElectionHow do JavaScript closures work?How to horizontally center a <div>?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How to check whether a checkbox is checked in jQuery?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?Why does HTML think “chucknorris” is a color?










-1


















	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>





I have an HTML donation form in one of the pages of the website (let's called donate page) which has JavaScript handle the functionalities and I copy its HTML & JavaScript from that page to use for the pop-up modal form which I use for the header (it applied for every page on the website) because I want it to look like that.



The pop-up modal form function works for every page except for the donate page. Either one of the forms won't work.



My question is how to resolve the share code conflict. I do not want to rename everything to make both forms work.










share|improve this question



















  • 2





    Please include code examples.

    – Steven Stark
    Mar 6 at 19:07






  • 2





    welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

    – Noni
    Mar 6 at 19:08











  • I added the code to show you but it is just some of the code.

    – passion
    Mar 6 at 19:17






  • 1





    IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

    – Niet the Dark Absol
    Mar 6 at 19:19











  • @NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

    – passion
    Mar 6 at 19:22















-1


















	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>





I have an HTML donation form in one of the pages of the website (let's called donate page) which has JavaScript handle the functionalities and I copy its HTML & JavaScript from that page to use for the pop-up modal form which I use for the header (it applied for every page on the website) because I want it to look like that.



The pop-up modal form function works for every page except for the donate page. Either one of the forms won't work.



My question is how to resolve the share code conflict. I do not want to rename everything to make both forms work.










share|improve this question



















  • 2





    Please include code examples.

    – Steven Stark
    Mar 6 at 19:07






  • 2





    welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

    – Noni
    Mar 6 at 19:08











  • I added the code to show you but it is just some of the code.

    – passion
    Mar 6 at 19:17






  • 1





    IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

    – Niet the Dark Absol
    Mar 6 at 19:19











  • @NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

    – passion
    Mar 6 at 19:22













-1












-1








-1











	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>





I have an HTML donation form in one of the pages of the website (let's called donate page) which has JavaScript handle the functionalities and I copy its HTML & JavaScript from that page to use for the pop-up modal form which I use for the header (it applied for every page on the website) because I want it to look like that.



The pop-up modal form function works for every page except for the donate page. Either one of the forms won't work.



My question is how to resolve the share code conflict. I do not want to rename everything to make both forms work.










share|improve this question



















	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>





I have an HTML donation form in one of the pages of the website (let's called donate page) which has JavaScript handle the functionalities and I copy its HTML & JavaScript from that page to use for the pop-up modal form which I use for the header (it applied for every page on the website) because I want it to look like that.



The pop-up modal form function works for every page except for the donate page. Either one of the forms won't work.



My question is how to resolve the share code conflict. I do not want to rename everything to make both forms work.






	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>





	$("#btn-One-time").on( "click", function() 

$('#don_term_1').click();

$("#donation-type").val('charge');
$("#payment_section_cycle").text(' once');

$('#monthly-options').hide();
$('#one-time-options').show();

$('#btn_don').addClass('active');
$('#btn_sdn').removeClass('active');

$('#otherAmountOnetime').removeClass('hidden');
$('#otherAmountMonthly').addClass('hidden');

$('#amount_other').val('');

clearError(false);

);

$("#btn-Monthly").on( "click", function()

$('#don_term_4').click();

$("#donation-type").val('sub');
$("#payment_section_cycle").text(' per month');

$('#one-time-options').hide();
$('#monthly-options').show();

$('#btn_don').removeClass('active');
$('#btn_sdn').addClass('active');

$('#otherAmountOnetime').addClass('hidden');
$('#otherAmountMonthly').removeClass('hidden');

clearError(false);

);

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="controlled_term_selection_section">

<div class="row">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 ">

<div id="custom_donation_grid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>
<h4>donation:</h4>
</div>
</div>
</div>
<div class="row">

<div class="col-xs-12 donation-recurring col-sm-12 col-md-12 col-lg-12 ">
<button type="button" id="btn_One-time" class="btn btn-lg btn-donation-recurring">One-time</button>
<button type="button" id="btn_Monthly" class="active btn btn-lg btn-donation-recurring">Monthly</button>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<div>&nbsp;<br>
<h4>donation:</h4>
</div>
</div>
</div>
<div id="donation-options" class="custom_donation_radios">

<div id="one-time-options" style="display: none;">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_1" value="50">
<span class="radio_label">
<span class="label_text">$50</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_2" value="100">
<span class="radio_label">
<span class="label_text">$100</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_3" value="250">
<span class="radio_label">
<span class="label_text">$250</span>
</span>
</label>
</div>
</div>

<div id="monthly-options">
<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_4" value="10" checked="">
<span class="radio_label">
<span class="label_text">$10</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_5" value="15">
<span class="radio_label">
<span class="label_text">$15</span>
</span>
</label>
</div>

<div class="radio">
<label>
<input type="radio" class="amount-total" name="amount" id="don_term_6" value="25">
<span class="radio_label">
<span class="label_text">$25</span>
</span>
</label>
</div>
</div>






javascript html






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 19:54









jhpratt

3,184102333




3,184102333










asked Mar 6 at 19:06









passionpassion

14




14







  • 2





    Please include code examples.

    – Steven Stark
    Mar 6 at 19:07






  • 2





    welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

    – Noni
    Mar 6 at 19:08











  • I added the code to show you but it is just some of the code.

    – passion
    Mar 6 at 19:17






  • 1





    IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

    – Niet the Dark Absol
    Mar 6 at 19:19











  • @NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

    – passion
    Mar 6 at 19:22












  • 2





    Please include code examples.

    – Steven Stark
    Mar 6 at 19:07






  • 2





    welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

    – Noni
    Mar 6 at 19:08











  • I added the code to show you but it is just some of the code.

    – passion
    Mar 6 at 19:17






  • 1





    IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

    – Niet the Dark Absol
    Mar 6 at 19:19











  • @NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

    – passion
    Mar 6 at 19:22







2




2





Please include code examples.

– Steven Stark
Mar 6 at 19:07





Please include code examples.

– Steven Stark
Mar 6 at 19:07




2




2





welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

– Noni
Mar 6 at 19:08





welcome to Stackoverflow, please try to share some code which helps us to check the validating the code, Thank you

– Noni
Mar 6 at 19:08













I added the code to show you but it is just some of the code.

– passion
Mar 6 at 19:17





I added the code to show you but it is just some of the code.

– passion
Mar 6 at 19:17




1




1





IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

– Niet the Dark Absol
Mar 6 at 19:19





IDs must be unique on the page. If you're copy-pasting that code, you'll have duplicate IDs.

– Niet the Dark Absol
Mar 6 at 19:19













@NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

– passion
Mar 6 at 19:22





@NiettheDarkAbsol I understand that is a problem I am facing now. How to resolve it?

– passion
Mar 6 at 19:22












1 Answer
1






active

oldest

votes


















0














I saw that you don't select the right elements.
I have make those changes



$("#btn-One-time") ----> $("#btn_One-time")



and



$("#btn-Monthly") -----> $("#btn_Monthly")






share|improve this answer























  • I changed it but it still does not work.

    – passion
    Mar 6 at 19:57











  • I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

    – Darius Clinton Tsafack
    Mar 6 at 20:02










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55030466%2fhow-to-resolve-a-share-html-js-code-conflict%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I saw that you don't select the right elements.
I have make those changes



$("#btn-One-time") ----> $("#btn_One-time")



and



$("#btn-Monthly") -----> $("#btn_Monthly")






share|improve this answer























  • I changed it but it still does not work.

    – passion
    Mar 6 at 19:57











  • I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

    – Darius Clinton Tsafack
    Mar 6 at 20:02















0














I saw that you don't select the right elements.
I have make those changes



$("#btn-One-time") ----> $("#btn_One-time")



and



$("#btn-Monthly") -----> $("#btn_Monthly")






share|improve this answer























  • I changed it but it still does not work.

    – passion
    Mar 6 at 19:57











  • I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

    – Darius Clinton Tsafack
    Mar 6 at 20:02













0












0








0







I saw that you don't select the right elements.
I have make those changes



$("#btn-One-time") ----> $("#btn_One-time")



and



$("#btn-Monthly") -----> $("#btn_Monthly")






share|improve this answer













I saw that you don't select the right elements.
I have make those changes



$("#btn-One-time") ----> $("#btn_One-time")



and



$("#btn-Monthly") -----> $("#btn_Monthly")







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 6 at 19:47









Darius Clinton TsafackDarius Clinton Tsafack

912




912












  • I changed it but it still does not work.

    – passion
    Mar 6 at 19:57











  • I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

    – Darius Clinton Tsafack
    Mar 6 at 20:02

















  • I changed it but it still does not work.

    – passion
    Mar 6 at 19:57











  • I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

    – Darius Clinton Tsafack
    Mar 6 at 20:02
















I changed it but it still does not work.

– passion
Mar 6 at 19:57





I changed it but it still does not work.

– passion
Mar 6 at 19:57













I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

– Darius Clinton Tsafack
Mar 6 at 20:02





I have tried it on code snippet. The body of callback function runs. You know that I am not able to test all because you don't post all the code.

– Darius Clinton Tsafack
Mar 6 at 20:02



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55030466%2fhow-to-resolve-a-share-html-js-code-conflict%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко