How can i plus a integer value after get sum result using jquery?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Actually, I want to get integer value this is working when i'm inserting value suppose i insert value 4+5
in input then I'm getting it in my result then I'm gettting it in another div with result like if I get 4+5
then it should be 9.
But i'm getting [object Object]
What is wrong in my code?
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
javascript jquery
add a comment |
Actually, I want to get integer value this is working when i'm inserting value suppose i insert value 4+5
in input then I'm getting it in my result then I'm gettting it in another div with result like if I get 4+5
then it should be 9.
But i'm getting [object Object]
What is wrong in my code?
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
javascript jquery
$('.finalResult').text(oldValue + getValue)
should solve
– Medet Tleukabiluly
Nov 16 '18 at 13:56
What's the value ofoldValue
? What it is holding and what is its type?
– Zainul Abideen
Nov 16 '18 at 14:03
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06
add a comment |
Actually, I want to get integer value this is working when i'm inserting value suppose i insert value 4+5
in input then I'm getting it in my result then I'm gettting it in another div with result like if I get 4+5
then it should be 9.
But i'm getting [object Object]
What is wrong in my code?
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
javascript jquery
Actually, I want to get integer value this is working when i'm inserting value suppose i insert value 4+5
in input then I'm getting it in my result then I'm gettting it in another div with result like if I get 4+5
then it should be 9.
But i'm getting [object Object]
What is wrong in my code?
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(boxValue);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
javascript jquery
javascript jquery
asked Nov 16 '18 at 13:55
Rohit VermaRohit Verma
1,63221126
1,63221126
$('.finalResult').text(oldValue + getValue)
should solve
– Medet Tleukabiluly
Nov 16 '18 at 13:56
What's the value ofoldValue
? What it is holding and what is its type?
– Zainul Abideen
Nov 16 '18 at 14:03
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06
add a comment |
$('.finalResult').text(oldValue + getValue)
should solve
– Medet Tleukabiluly
Nov 16 '18 at 13:56
What's the value ofoldValue
? What it is holding and what is its type?
– Zainul Abideen
Nov 16 '18 at 14:03
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06
$('.finalResult').text(oldValue + getValue)
should solve– Medet Tleukabiluly
Nov 16 '18 at 13:56
$('.finalResult').text(oldValue + getValue)
should solve– Medet Tleukabiluly
Nov 16 '18 at 13:56
What's the value of
oldValue
? What it is holding and what is its type?– Zainul Abideen
Nov 16 '18 at 14:03
What's the value of
oldValue
? What it is holding and what is its type?– Zainul Abideen
Nov 16 '18 at 14:03
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06
add a comment |
4 Answers
4
active
oldest
votes
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
your code is working fine but what use ofeval()
in this code?
– Rohit Verma
Nov 16 '18 at 16:15
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
see this fiddle
add a comment |
I'm not quite sure what your ultimate goal is, but the [Object Object] occurs because you are placing the jQuery representation of .box into the DOM, which is an object.
Try changing these lines ...
oldValue = +$('.box').text() || 0;
getValue = +$('.getValue').val();
$('.finalResult').text(boxValue.text());
The first two lines are one way to ensure you have a number; the last places the correct "text".
add a comment |
You are getting [objec object]
because you are actually trying to set an object in the div, below see the problem line. What you are doing is that you calculate the some and set the result .finalResult div but you are actually assigning the div to a variable and jquery is treating that variable as an object
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue); //<-- problem
$('.finalResult').text(boxValue);
});
});
change the following line
$('.finalResult').text(boxValue);
with this one
$('.finalResult').text(boxValue.text());
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53339247%2fhow-can-i-plus-a-integer-value-after-get-sum-result-using-jquery%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
your code is working fine but what use ofeval()
in this code?
– Rohit Verma
Nov 16 '18 at 16:15
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
your code is working fine but what use ofeval()
in this code?
– Rohit Verma
Nov 16 '18 at 16:15
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue);
$('.finalResult').text(Number(oldValue || '0') + eval(getValue));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box"></div>
<div class="finalResult"></div>
answered Nov 16 '18 at 14:03
Medet TleukabilulyMedet Tleukabiluly
6,47522246
6,47522246
your code is working fine but what use ofeval()
in this code?
– Rohit Verma
Nov 16 '18 at 16:15
add a comment |
your code is working fine but what use ofeval()
in this code?
– Rohit Verma
Nov 16 '18 at 16:15
your code is working fine but what use of
eval()
in this code?– Rohit Verma
Nov 16 '18 at 16:15
your code is working fine but what use of
eval()
in this code?– Rohit Verma
Nov 16 '18 at 16:15
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
see this fiddle
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
see this fiddle
add a comment |
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
see this fiddle
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
see this fiddle
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
if(!isNaN(oldValue) && !isNaN(getValue) )
{
boxValue = $('.box').text(oldValue + getValue);// in this line you are setting a value and assignig it to boxValue
$('.finalResult').text(boxValue.text());//I am replacing this line
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button>Button</button>
<input type="text" class="getValue">
<div class="box">0</div>
<div class="finalResult"></div>
answered Nov 16 '18 at 14:04
Negi RoxNegi Rox
1,9141512
1,9141512
add a comment |
add a comment |
I'm not quite sure what your ultimate goal is, but the [Object Object] occurs because you are placing the jQuery representation of .box into the DOM, which is an object.
Try changing these lines ...
oldValue = +$('.box').text() || 0;
getValue = +$('.getValue').val();
$('.finalResult').text(boxValue.text());
The first two lines are one way to ensure you have a number; the last places the correct "text".
add a comment |
I'm not quite sure what your ultimate goal is, but the [Object Object] occurs because you are placing the jQuery representation of .box into the DOM, which is an object.
Try changing these lines ...
oldValue = +$('.box').text() || 0;
getValue = +$('.getValue').val();
$('.finalResult').text(boxValue.text());
The first two lines are one way to ensure you have a number; the last places the correct "text".
add a comment |
I'm not quite sure what your ultimate goal is, but the [Object Object] occurs because you are placing the jQuery representation of .box into the DOM, which is an object.
Try changing these lines ...
oldValue = +$('.box').text() || 0;
getValue = +$('.getValue').val();
$('.finalResult').text(boxValue.text());
The first two lines are one way to ensure you have a number; the last places the correct "text".
I'm not quite sure what your ultimate goal is, but the [Object Object] occurs because you are placing the jQuery representation of .box into the DOM, which is an object.
Try changing these lines ...
oldValue = +$('.box').text() || 0;
getValue = +$('.getValue').val();
$('.finalResult').text(boxValue.text());
The first two lines are one way to ensure you have a number; the last places the correct "text".
answered Nov 16 '18 at 14:05
rfornalrfornal
4,32952235
4,32952235
add a comment |
add a comment |
You are getting [objec object]
because you are actually trying to set an object in the div, below see the problem line. What you are doing is that you calculate the some and set the result .finalResult div but you are actually assigning the div to a variable and jquery is treating that variable as an object
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue); //<-- problem
$('.finalResult').text(boxValue);
});
});
change the following line
$('.finalResult').text(boxValue);
with this one
$('.finalResult').text(boxValue.text());
add a comment |
You are getting [objec object]
because you are actually trying to set an object in the div, below see the problem line. What you are doing is that you calculate the some and set the result .finalResult div but you are actually assigning the div to a variable and jquery is treating that variable as an object
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue); //<-- problem
$('.finalResult').text(boxValue);
});
});
change the following line
$('.finalResult').text(boxValue);
with this one
$('.finalResult').text(boxValue.text());
add a comment |
You are getting [objec object]
because you are actually trying to set an object in the div, below see the problem line. What you are doing is that you calculate the some and set the result .finalResult div but you are actually assigning the div to a variable and jquery is treating that variable as an object
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue); //<-- problem
$('.finalResult').text(boxValue);
});
});
change the following line
$('.finalResult').text(boxValue);
with this one
$('.finalResult').text(boxValue.text());
You are getting [objec object]
because you are actually trying to set an object in the div, below see the problem line. What you are doing is that you calculate the some and set the result .finalResult div but you are actually assigning the div to a variable and jquery is treating that variable as an object
$(document).ready(function(){
$('button').click(function(){
var oldValue;
var getValue;
var boxValue;
oldValue = $('.box').text();
getValue = $('.getValue').val();
boxValue = $('.box').text(oldValue + getValue); //<-- problem
$('.finalResult').text(boxValue);
});
});
change the following line
$('.finalResult').text(boxValue);
with this one
$('.finalResult').text(boxValue.text());
answered Nov 16 '18 at 14:12
RopAli MunshiRopAli Munshi
702516
702516
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53339247%2fhow-can-i-plus-a-integer-value-after-get-sum-result-using-jquery%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$('.finalResult').text(oldValue + getValue)
should solve– Medet Tleukabiluly
Nov 16 '18 at 13:56
What's the value of
oldValue
? What it is holding and what is its type?– Zainul Abideen
Nov 16 '18 at 14:03
So you are setting text() with a jQuery object!
– epascarello
Nov 16 '18 at 14:18
@Medet Tleukabiluly i'm getting same value on both result.
– Rohit Verma
Nov 16 '18 at 16:06