Click here to Skip to main content
15,886,091 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionMSN style links Pin
Bart23-Jun-13 10:20
Bart23-Jun-13 10:20 
AnswerRe: MSN style links Pin
thanh_bkhn23-Jun-13 16:09
professionalthanh_bkhn23-Jun-13 16:09 
GeneralRe: MSN style links Pin
Bart25-Jun-13 10:22
Bart25-Jun-13 10:22 
QuestionHow to show info marker google maps when clicked in outside map? Pin
Akbarblack22-Jun-13 4:12
Akbarblack22-Jun-13 4:12 
AnswerRe: How to show info marker google maps when clicked in outside map? Pin
Dan Randolph23-Jun-13 8:55
Dan Randolph23-Jun-13 8:55 
GeneralRe: How to show info marker google maps when clicked in outside map? Pin
Akbarblack10-Dec-13 20:32
Akbarblack10-Dec-13 20:32 
QuestionShopping Cart Qty Button - I need to make it faster Pin
jkirkerx21-Jun-13 11:16
professionaljkirkerx21-Jun-13 11:16 
AnswerRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 11:19
enhzflep24-Jun-13 11:19 
Jeepers, in 6-7 secs on a 650Mhz android phone, I can generate an image thats 256x256, with 2 calls to _each_ of square root, sin and cos - perPixel.

Something I notice is that you've got many instances of $('[id*="_txt_Modal_Add2Cart_SelectQty"]') in your code. I'd try just evaluating that statement once, before then using it later - much like you did for the css rules.

I dont jQuery, I apologise if the syntax is incorrect.

In any case,the point is - evaluate expensive things as few times as possible.
In my code, this could be done by pre-computing sin cos and sqrt tables. In yours I'd assume you could evaluate the statement I've mentioned. I expect it takes jQuery some time to parse the statement before finding the element that you wish to target.

I.e
JavaScript
var txtModalSelectQtyEl = $('[id*="_txt_Modal_Add2Cart_SelectQty"]');
...
...
var qty_value = txtModalSelectQtyEl.val();
...
...
txtModalSelectQtyEl.css('background-color', txtFocus);
..
..

Make it work. Then do it better - Andrei Straut

GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
jkirkerx24-Jun-13 11:38
professionaljkirkerx24-Jun-13 11:38 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 12:15
enhzflep24-Jun-13 12:15 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
jkirkerx24-Jun-13 12:33
professionaljkirkerx24-Jun-13 12:33 
GeneralRe: Shopping Cart Qty Button - I need to make it faster Pin
enhzflep24-Jun-13 12:53
enhzflep24-Jun-13 12:53 
QuestionJavascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_19-Jun-13 18:32
professional_Maxxx_19-Jun-13 18:32 
AnswerRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
AlphaDeltaTheta19-Jun-13 19:00
AlphaDeltaTheta19-Jun-13 19:00 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_20-Jun-13 1:29
professional_Maxxx_20-Jun-13 1:29 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
AlphaDeltaTheta20-Jun-13 1:37
AlphaDeltaTheta20-Jun-13 1:37 
AnswerRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
Payrok17-Jul-13 5:45
Payrok17-Jul-13 5:45 
GeneralRe: Javascript, KnockoutJS (and possibly TypeScript) Pin
_Maxxx_17-Jul-13 13:01
professional_Maxxx_17-Jul-13 13:01 
GeneralLooking for team Pin
ashkanpower17-Jun-13 23:03
ashkanpower17-Jun-13 23:03 
GeneralRe: Looking for team Pin
Richard MacCutchan17-Jun-13 23:35
mveRichard MacCutchan17-Jun-13 23:35 
GeneralRe: Looking for team Pin
ashkanpower18-Jun-13 0:49
ashkanpower18-Jun-13 0:49 
QuestionHTML issue with IE. Pin
InderK17-Jun-13 3:17
InderK17-Jun-13 3:17 
AnswerRe: HTML issue with IE. Pin
Richard Deeming17-Jun-13 4:46
mveRichard Deeming17-Jun-13 4:46 
GeneralRe: HTML issue with IE. Pin
InderK19-Jun-13 1:25
InderK19-Jun-13 1:25 
AnswerRe: HTML issue with IE. Pin
Dholakiya Ankit10-Aug-13 1:43
Dholakiya Ankit10-Aug-13 1:43 

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.