dimanche 2 novembre 2014

How to write these jquery lines in basic javascript


Vote count:

0




I am trying to convert these lines of jquery to basic javascript.


Please look at <<jsfiddle>>



$(document).ready(function () {
$('button').click(function () {
var parent = $(this).parent();
var subtract = parseInt(parent.find('#subtract').val(), 10);
var current = parseInt(parent.find('.number p').text(), 10);
var newVal = current - subtract;
//$('.number p').effect('explode');
parent.find('.number p').text(newVal);
});
});


Thanks for anyhelp. This jquery works , but I cannot use it because of multiple reasons.



asked 1 min ago







How to write these jquery lines in basic javascript

Aucun commentaire:

Enregistrer un commentaire