İptal Edildi

Complete a JavaScript statement to remove an array value on click

This is the existing statement:

<script>

var subs_array = [];

$('.sub').one('click', function(e){

[url removed, login to view]();

[url removed, login to view]( $(this).data('user-subscription') );

$('#sub').val(subs_array);

});

</script>

<!-- the html -->

<a href='#' class="sub" data-user-subscription='Magazine #1'>Subscribe to #1</a>

<a href='#' class="sub" data-user-subscription='Magazine #2'>Subscribe to #2</a>

<a href='#' class="sub" data-user-subscription='Magazine #3'>Subscribe to #3</a>

<input type="text" class="form-control" id="sub" size="50" value="" placeholder="Magazine #1, Magazine #2, Magazine #3">

The problem:

When you click on the link, it adds the value into the array and it is added into the input field but if you click again, it does not remove the value.

Modify the above statement so when you click on a link the first time, it adds the value into the array but if you click again, it removes the value.

Beceriler: Javascript, jQuery / Prototype

Daha fazlasını görün: remove javascript ctrl click, read array xml javascript, javascript tabs complete, remove javascript tags java, asp remove javascript, asp remove javascript code, remove javascript codes, remove javascript tags, java remove javascript tags, remove javascript website, javascript calculator complete code, remove javascript, click drop menu javascript

İşveren Hakkında:
( 5 değerlendirme ) Gold Coast, Australia

Proje NO: #14795540

50 freelancer bu iş için ortalamada 18$ teklif veriyor

tlchung

I am a skilled js developer, I can make the js script remove the value when you click again. let discuss more via private message, thanks. Relevant Skills and Experience I am a skilled js developer, I can make the js Daha fazlası

1 gün içinde 20$ AUD
(106 Değerlendirme)
6.8
BaNgan

Hi, We can check existence of the value and remove it in second click Relevant Skills and Experience Feel free to contact me via Skype: bangank36, my timezone is GMT+7. My resume website: http://dataplayer.biz/ Regar Daha fazlası

1 gün içinde 17$ AUD
(174 Değerlendirme)
6.6
WebInfoSolutions

Actually the issue is in jquery code, I can fix that..............................................................................

in 0 gün içinde14$ AUD
(33 Değerlendirme)
6.3
florinbacu

A proposal has not yet been provided

1 gün içinde 15$ AUD
(27 Değerlendirme)
5.9
MimiFL

Modifying the existing script to add capability to add / remove items that are already in the array when clicked on the link. Relevant Skills and Experience I m serious freelancer with 100% completion rate and i be Daha fazlası

in 0 gün içinde11$ AUD
(134 Değerlendirme)
5.8
in 0 gün içinde10$ AUD
(33 Değerlendirme)
4.7
ykarora26

A proposal has not yet been provided

in 2 gün içinde110$ AUD
(24 Değerlendirme)
4.7
saagark22

Hi, I can modify your script so first time link will add value to array when pressed second time it will remove that value. Relevant Skills and Experience 3+ years experience with JavaScript. Proposed Milestones Daha fazlası

1 gün içinde 15$ AUD
(26 Değerlendirme)
4.3
mmpatel009

Hello, Hope you are doing well, JSfiddler like is generated for you, please initiate message board so I can provide you Relevant Skills and Experience I have already corrected your script in local and availab Daha fazlası

1 gün içinde 10$ AUD
(23 Değerlendirme)
4.1
celalaybar

Hello. I can help you. Relevant Skills and Experience I am good at JavaScript, HTML and CSS. Proposed Milestones $10 AUD - Done

in 0 gün içinde10$ AUD
(12 Değerlendirme)
4.2
jasonsio

Hello, I can knock this out quickly for you. Relevant Skills and Experience I'm experienced in cross browser JavaScript development. I can make the modification to your jQuery script. Proposed Milestones $18 AUD - P Daha fazlası

1 gün içinde 36$ AUD
(9 Değerlendirme)
3.7
MisterWatson

edit: I now have a working solution. hit me up when you're ready to test it. theres actually a typo with the click event handler and your code does not have a function call to actually remove an existing value. I w Daha fazlası

in 0 gün içinde20$ AUD
(5 Değerlendirme)
3.7
mkjtunna

Hi, i read your project description and would like to help you with it. i have more then 5 years of Web Designing and Development experience with PHP and wordpress knowledge. Relevant Skills and Experience i can fini Daha fazlası

1 gün içinde 17$ AUD
(17 Değerlendirme)
3.9
nizamulamy

Hello, How are you? I read your job with interest. I can do it. I'm a full-time freelancer, I can contribute time and energy to the finish your job. Relevant Skills and Experience I’m an expert Web Developer with mo Daha fazlası

1 gün içinde 17$ AUD
(14 Değerlendirme)
3.6
superwanchiu

hello nice to meet you. i am very interested in your project i have rich experience for javascript . your project is very easy for me. i can complete your project in a short time. please send your message so that Daha fazlası

1 gün içinde 15$ AUD
(6 Değerlendirme)
3.2
emmanverz

Hello and good day sir, I want to apply for the job. I'am a young creative full stack web developer for almost 5 years and my expertise are on PHP and MySQL. I have decent knowledge also on web hosting specially using Daha fazlası

in 0 gün içinde20$ AUD
(5 Değerlendirme)
3.2
in 0 gün içinde16$ AUD
(9 Değerlendirme)
3.3
1 gün içinde 15$ AUD
(5 Değerlendirme)
3.0
hossaincse2

Recently I have successfully completed Some project on 1.http://digitalproductone.co.technology/ 2.http://softseven.org/users/login 3.http://hossain.ramsitech.com/ 4.http://basicgk.com/ Relevant Skills and Experience Daha fazlası

1 gün içinde 17$ AUD
(10 Değerlendirme)
2.9
Weborchid

We are the team that visualize, pens down ideas, adds in the essential ingredient of creativity and imagination and cooks up that perfect dish called brand. Lets discuss in details.

1 gün içinde 55$ AUD
(5 Değerlendirme)
2.4