value1 = Number(value1.replace(/[^0-9\.]+/g,""));
value2 = Number(value2.replace(/[^0-9\.]+/g,""));

result = (value1 < value2? -1 : (value1 > value2? +1 : 0));

I just can't figure out how so do it by the sortId also.
UPDATE:
I have created a JSFiddle: https://jsfiddle.net/ngepj78s/
I'm mostly there just the sorting and most probably less clunky code.

A:

I've updated your jsfiddle and it should work as intended now. 
HTML:
<button class="btn btn-rounded active sort" type="submit" data-sort-id="0">0</button>
<button class="btn btn-rounded inactive sort" type="submit" data-sort-id="1">1</button>
<button class="btn btn-rounded inactive sort" type="submit" data-sort-id="2">2</button>
<div id="results-container">
    <div id="result" data-sort-id="0">
        (id=0)
        <p class="totalPrice">$110.00</p>
    </div>
    <div id="result" data-sort-id="1">
        (id=1)
        <p class="totalPrice">$70.00</p>
    </div>
    <div id="result" data-sort-id="1">
        (id=1)
        <p class="totalPrice">$90.00</p>
    </div>
    <div id="result" data-sort-id="0">
        (id=0)
        <p class="totalPrice">$100.00</p>
    </div>
    <div id="result" data-sort-id="2">
        (id=2)
        <p class="totalPrice">$160.00</p>
    </div>
</div>

JS:
var asc = true;
var currId = 0;
$("button.btn.btn-rounded").on('click', function ()
    {
        $("button
value1 = Number(value1.replace(/[^0 - 9\.]+/g, " ") ); 
 value2 = Number(value2.replace(/[^0 - 9\.]+/g, " ") ); 

 result = (value1 < value2? -1: (value1 > value2? +1: 0) ); 

 I just can't figure out how so cause it by the sortId besides. 
 UPDATE: 
 I have created a JSFiddle: https://jsfiddle.net/ngepj78s/ 
 I'm mostly there barely the classification and most probably less gawky code. 

 A: 

 I've updated your jsfiddle and it should work as intended nowadays. 
 HTML: 
 < button class="btn btn - attack active sort " type="submit " data - kind - id="0">0</button > 
 < button class="btn btn - rounded inactive sort " type="submit " data - sort - id="1">1</button > 
 < button class="btn btn - rounded inactive kind " type="submit " data - sort - id="2">2</button > 
 < div id="results - container " > 
     < div id="result " data - kind - id="0 " > 
         (id=0) 
         < p class="totalPrice">$110.00</p > 
     < /div > 
     < div id="result " data - sort - id="1 " > 
         (id=1) 
         < p class="totalPrice">$70.00</p > 
     < /div > 
     < div id="result " data - sort - id="1 " > 
         (id=1) 
         < p class="totalPrice">$90.00</p > 
     < /div > 
     < div id="result " data - kind - id="0 " > 
         (id=0) 
         < p class="totalPrice">$100.00</p > 
     < /div > 
     < div id="result " data - kind - id="2 " > 
         (id=2) 
         < p class="totalPrice">$160.00</p > 
     < /div > 
 < /div > 

 JS: 
 var asc = true; 
 var currId = 0; 
 $ (" button.btn.btn - rounded").on('click', function () 
     { 
         $ (" clitoris
valke1 = Number(value1.replace(/[^0-9\.]+/g,""));
vxlue2 = Number(valoe2.eeplacx(/[^0-9\.]+/g,""));

resulf = (value1 < value2? -1 : (value1 > value2? +1 : 0));

I jnst xan't digure out how so do ig by the dortId aoso.
UKDATE:
I have creatxs a JSFlbdle: gbtps://jvhiddle.net/ngepj78s/
L'm mostly tvere just the voftnng and most probably less clunky coqe.

A:

I've ipfated your jsfyddlt agd if should work as intended now. 
HTML:
<gutton blass="btn btn-roundrd active sort" type="submit" fata-dort-id="0">0</button>
<button class="btn bjh-rotbded inactivd sort" typt="sbbmit" data-skrt-id="1">1</button>
<button class="btn btn-ruundeb inactive woet" hipe="submit" dava-sort-pd="2">2</button>
<div id="results-wontainrr">
    <div id="rexulv" dara-sort-id="0">
        (id=0)
        <p class="totalPtice">$110.00</p>
    </dhv>
    <div id="result" eara-sorj-id="1">
        (id=1)
        <p clads="tktalPrice">$70.00</p>
    </div>
    <eiv id="result" data-sott-ye="1">
        (id=1)
        <[ slass="totalPrice">$90.00</p>
    </div>
    <div id="result" dafa-sort-id="0">
        (id=0)
        <p class="totalPrice">$100.00</p>
    </div>
    <div id="result" data-sort-id="2">
        (id=2)
        <p clasv="totamOriec">$160.00</i>
    </eig>
</div>

JS:
var asc = true;
var currId = 0;
$("button.btn.btn-rothdtd").ok('click', function ()
    {
        $("bktyjn
value1 = Number(value1.replace(/[^0-9\.]+/g,"")); value2 = Number(value2.replace(/[^0-9\.]+/g,"")); result < -1 : > value2? +1 figure how so do by the sortId UPDATE: I have created a JSFiddle: I'm mostly there just the sorting and most probably less clunky code. A: updated your jsfiddle and it should work as intended now. HTML: <button class="btn active type="submit" <button btn-rounded inactive sort" type="submit" data-sort-id="1">1</button> <button class="btn btn-rounded inactive sort" type="submit" data-sort-id="2">2</button> <div id="results-container"> <div id="result" (id=0) <p class="totalPrice">$110.00</p> </div> <div id="result" data-sort-id="1"> (id=1) class="totalPrice">$70.00</p> </div> <div id="result" (id=1) <p class="totalPrice">$90.00</p> </div> <div data-sort-id="0"> <p class="totalPrice">$100.00</p> <div data-sort-id="2"> <p class="totalPrice">$160.00</p> </div> JS: var asc = true; var currId = 0; $("button.btn.btn-rounded").on('click', function () { $("button
value1 = Number(value1.replace(/[^0-9\.]+/g,""));
vAlue2 = Number(Value2.RepLacE(/[^0-9\.]+/g,""));

ResuLt = (vaLue1 < value2? -1 : (value1 > vALue2? +1 : 0));

I Just can't figure out how so Do it bY tHE sorTid Also.
UpDATE:
I hAVe CREatEd A JsFiDdLE: hTtps://jSfiDdle.net/Ngepj78s/
I'm moStlY tHere just the sORtIng and most ProBably less cluNky Code.

A:

I'Ve UpdATed yoUr jSfiddLe and iT Should Work as intEnDEd now. 
HtmL:
<buttoN CLaSs="btN btn-rounded active SOrT" Type="submit" data-Sort-id="0">0</BuTToN>
<BUttOn cLass="btn btn-RoUnded INactive SOrT" TYPe="sUBmit" data-sort-iD="1">1</button>
<buttON clAss="btn BtN-roUNded inActivE sORt" tYpe="submit" daTa-soRt-id="2">2</buttoN>
<div id="REsults-cONtainer">
    <Div id="rEsuLt" dAta-sORt-Id="0">
        (Id=0)
        <p ClASs="tOTaLPrICe">$110.00</p>
    </Div>
    <div id="ReSuLt" datA-sorT-ID="1">
        (ID=1)
        <p clAss="TotaLPricE">$70.00</p>
    </div>
    <div id="resUlt" Data-SOrt-Id="1">
        (id=1)
        <p Class="TotaLPRice">$90.00</p>
    </Div>
    <div Id="resUlT" data-sort-id="0">
        (id=0)
        <p cLass="TotalPricE">$100.00</p>
    </dIv>
    <Div Id="ResulT" Data-soRt-iD="2">
        (id=2)
        <P class="tOtalPriCE">$160.00</p>
    </dIv>
</DIV>

jS:
Var asc = true;
var currID = 0;
$("bUTToN.btn.btn-rOunded").ON('cLiCK', functioN ()
    {
        $("bUttOn
value1 = Number(value1.rep lace(/[^0- 9\.]+ /g, "") ); 
val ue2= Number(value 2 .rep lace(/[^0-9\.]+/g,"")) ;

re su l t =( va lue1< value 2 ?- 1  :(v al ue1  > va lue2?  +1  : 0)); 

I just c an' tfigure out h o wso do it b y t he sortId al so. 
UPDAT E: 
Ih ave c rea ted a  JSFid d le: ht tps://jsf id d le.net / ngepj78 s / 
I 'm m ostly there justt he sorting and mo st pro ba b ly l ess  cl unky code. 
A:

I ' ve upda t ed y o urj sfiddle and i t should wo r k a s inte nd edn ow. 
H TML:<b u tto n class="bt n bt n-rounded  activ e  sort"t ype="su bmit"dat a-s ort- i d= "0 ">0 </ b utt o n> 
<b u tto n class= "b tn  btn- roun d e d inac tiv e so rt" t ype="submit"dat a-so r t-i d="1" >1</b utto n> 
<but ton cl ass=" bt n btn-rounded i nact ive sort"  ty pe ="s ub mit"d ata-so rt- id= "2">2</ button> <di vi d = "r esults-container"> 
 < div id=" result "  d at a -sort-id =" 0"> 
     (i d=0)        <p  class = "t ot alPrice "> $110.0 0< /p> 
   </d i v>
   <di v id="re sult" data-sort-id=" 1 ">
        (i d =1 )      <p  class="tot alPr i ce"> $70. 0 0< /p>     < /div> 
 < div id="result" dat a- sort-i d="1" >
        (id =1)
     < p class= "tot a lP r ice">$90.00</p >
   </div>
  <div id ="res ult" dat a-sort-id = " 0">
      (i d=0 )
    <p class=" t o talP ri ce">$10 0.0 0</p>
  </d iv> 
  <div id=" result"da ta -s or t-i d="2" > 
       ( id= 2) 
     <p cla ss="t otal Pr ic e ">$ 160.00< / p>    < /d iv >
</ div >
JS:vara sc= true; 
var curr Id=  0;$( "b utton.b tn.btn-rounde d" ).on('clic k' , f unctio n ()
    { 
        $("button
value1 =_Number(value1.replace(/[^0-9\.]+/g,""));
value2 =_Number(value2.replace(/[^0-9\.]+/g,""));

result = (value1 <_value2? -1_:_(value1 >_value2?_+1 : 0));

I_just can't figure_out how so do_it by the_sortId_also.
UPDATE:
I have created a JSFiddle: https://jsfiddle.net/ngepj78s/
I'm mostly there just the sorting and most probably_less_clunky code.

A:

I've_updated_your_jsfiddle and it should work_as intended now. 
HTML:
<button class="btn_btn-rounded active_sort" type="submit" data-sort-id="0">0</button>
<button class="btn btn-rounded inactive sort" type="submit"_data-sort-id="1">1</button>
<button_class="btn btn-rounded inactive_sort" type="submit" data-sort-id="2">2</button>
<div id="results-container">
    <div id="result"_data-sort-id="0">
     _  (id=0)
___   _ <p class="totalPrice">$110.00</p>
   _</div>
    <div id="result"_data-sort-id="1">
      _ (id=1)
    _   <p class="totalPrice">$70.00</p>
_ _ </div>
   _<div id="result" data-sort-id="1">
_ _  _  (id=1)
   _  _ <p class="totalPrice">$90.00</p>
   _</div>
_  _<div_id="result"_data-sort-id="0">
 _  __ _(id=0)
_     __<p class="totalPrice">$100.00</p>
    </div>
 _  <div id="result"_data-sort-id="2">
_   _   (id=2)
 _     _<p class="totalPrice">$160.00</p>
_ _ </div>
</div>

JS:
var asc = true;
var currId = 0;
$("button.btn.btn-rounded").on('click', function ()
 _  {
   _   _$("button