Click here to Skip to main content
15,851,395 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Next JavaScript Question Pin
Richard Deeming25-Apr-17 9:14
mveRichard Deeming25-Apr-17 9:14 
GeneralRe: Next JavaScript Question Pin
Kevin Marois25-Apr-17 9:16
professionalKevin Marois25-Apr-17 9:16 
GeneralRe: Next JavaScript Question Pin
Richard Deeming25-Apr-17 9:22
mveRichard Deeming25-Apr-17 9:22 
GeneralRe: Next JavaScript Question Pin
Kevin Marois25-Apr-17 9:23
professionalKevin Marois25-Apr-17 9:23 
QuestionQuick JavaScript Question Pin
Kevin Marois25-Apr-17 7:27
professionalKevin Marois25-Apr-17 7:27 
AnswerRe: Quick JavaScript Question Pin
Richard Deeming25-Apr-17 7:59
mveRichard Deeming25-Apr-17 7:59 
GeneralRe: Quick JavaScript Question Pin
Kevin Marois25-Apr-17 8:09
professionalKevin Marois25-Apr-17 8:09 
GeneralRe: Quick JavaScript Question Pin
Kevin Marois25-Apr-17 8:16
professionalKevin Marois25-Apr-17 8:16 
So why not instead of
function formatStock(stock) {
    return $.extend(stock, {
        Price: stock.Price.toFixed(2),
        PercentChange: (stock.PercentChange * 100).toFixed(2) + '%',
        Direction: stock.Change === 0 ? '' : stock.Change >= 0 ? up : down
    });
}
just do
function formatStock(stock) {

    stock.Price: stock.Price.toFixed(2);
    stock.PercentChange: (stock.PercentChange * 100).toFixed(2) + '%';
    stock.Direction: stock.Change === 0 ? '' : stock.Change >= 0 ? up : down;

    return stock;
}
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

GeneralRe: Quick JavaScript Question Pin
Richard Deeming25-Apr-17 9:10
mveRichard Deeming25-Apr-17 9:10 
GeneralRe: Quick JavaScript Question Pin
Kevin Marois25-Apr-17 9:11
professionalKevin Marois25-Apr-17 9:11 
GeneralRe: Quick JavaScript Question Pin
Richard Deeming25-Apr-17 9:15
mveRichard Deeming25-Apr-17 9:15 
GeneralRe: Quick JavaScript Question Pin
Kevin Marois25-Apr-17 9:19
professionalKevin Marois25-Apr-17 9:19 
QuestionAdd or Update Row In Data Table Pin
Kevin Marois24-Apr-17 13:13
professionalKevin Marois24-Apr-17 13:13 
AnswerRe: Add or Update Row In Data Table Pin
Richard Deeming25-Apr-17 13:48
mveRichard Deeming25-Apr-17 13:48 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois25-Apr-17 13:49
professionalKevin Marois25-Apr-17 13:49 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois26-Apr-17 9:01
professionalKevin Marois26-Apr-17 9:01 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming27-Apr-17 2:39
mveRichard Deeming27-Apr-17 2:39 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois28-Apr-17 8:21
professionalKevin Marois28-Apr-17 8:21 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming28-Apr-17 9:27
mveRichard Deeming28-Apr-17 9:27 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois1-May-17 7:55
professionalKevin Marois1-May-17 7:55 
GeneralRe: Add or Update Row In Data Table Pin
Richard Deeming3-May-17 10:51
mveRichard Deeming3-May-17 10:51 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois3-May-17 11:35
professionalKevin Marois3-May-17 11:35 
GeneralRe: Add or Update Row In Data Table Pin
Kevin Marois3-May-17 11:37
professionalKevin Marois3-May-17 11:37 
QuestionMSChart load at Runtime raise error NullReferenceException System.Web.UI.DataVisualization.Charting.Axis.Resize Pin
lamiaa_moh23-Apr-17 3:06
lamiaa_moh23-Apr-17 3:06 
AnswerRe: MSChart load at Runtime raise error NullReferenceException System.Web.UI.DataVisualization.Charting.Axis.Resize Pin
Afzaal Ahmad Zeeshan23-Apr-17 3:33
professionalAfzaal Ahmad Zeeshan23-Apr-17 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.