You have positions and dimensions, in the same package! Isn't that wonderful Wanda!? Wanda: Yes! And for just an extra 99.99, you get a FREE vacuum cleaner!
Ok. But I used .css('width') and it returned different that I saw in Chrome Dev Tools ;p Like it was still doing the count, instead of returning css value.
@Neal pedantics for the sake of??? obviously box model applies differently for different browsers. Killah you just don't mix css + js for style manipulation. I did for a hard coded example.
You should avoid large loops in any case - however with that said it doesn't really matter - some will argue semantics, some performance, I say do what you like - if it is a bottleneck we can discuss alternatives then
@Neal if you have the edge case that this would fuck up then clap clap here is a cookie. otherwise IT IS RIGHT albeit ugly.
no go back into your corner and play with these matches. :P
if how you write your loop has any effect on the performance of your page (not caching, for vs et al, caching is just prudent) then you have bigger problems
loops should be reduced at all costs... they are expensive in any case.
I am trying to run the following jQuery:
var query = 'http://api.ustream.tv/json/channel/masaiblog/getValueOf/status?jsonp=?';
$.getJSON(query, function(data)
{
if (data['results'] == 'live')
{
alert('ITS LIVE!');
}
});
Very simple, right? It goes to the Ustream API, ge...
@Killah you should never be running million of iterations.... if this is the case chunk it out and run a few at a time. remember the illusion of performance is much more powerful than performance itself.
imac with no over-clocking, ssd, and no extra stuff === uber uber uber hot. idk about the laptops... but anything with that much hardware (esp the display) and that little room + fans will get hot
About
Provides keyboard shortcuts for common text formatting commands, reducing the dependency on mouse usage. Current version does not have a configurable set of hotkeys but later versions will.
How to use.
All of the following commands are run if the user has focus in the chat input area.
...
@Zirak I once read that defining additional methods for a js "object" outside of its definition was using less memory (ie: outside=method is allocated once and used by every instance, inside=method is copied inside every instance), do you know if it's still the case ? I personnaly never care too much about that but just curious
I can dispatch a simple click event (without any optional parameters) with:
var clickEvt = document.createEvent("MouseEvents");
clickEvt.initEvent("click");
element.dispatchEvent(clickEvt);
But how do I dispatch a double-click event?
I'm creating custom file upload control in asp.net
my code :
I have code which uses java script code:
<table width="100" >
<tr>
<td id="tdFileInputs" width="100" valign="top">
</td>
</tr>
<tr>
<td...
@Fred If I need to make something heavier, which is once in every other century, I put the "prototype" as its own object, and call Object.create. It's easy to add in a "constructor" function
if(alert($shipa.indexOf("Fill This If Using Your Own Shipping Account") != -1 && alert($shipb.indexOf("Fill This If Using Your Own Shipping Account") != -1)
I am using Jquery, I have something kinda close so far (I think) - just noticed my class name was wrong; updating it now to see if it works right
<script> var $shipa = $("#FormField_25"); var $shipb = $("#FormField_26");
if(alert($shipa.indexOf("Fill This If Using Your Own Shipping Account") != -1 && alert($shipb.indexOf("Fill This If Using Your Own Shipping Account") != -1) { $(".ShippingProviderList").hide(); } </script>
@NRGdallas I think that you want to do something like this, am I wrong ?
<script> var $shipa = $("#FormField_25"); var $shipb = $("#FormField_26");
if ($shipa.indexOf("Fill This If Using Your Own Shipping Account")!=-1 && $shipb.indexOf("Fill This If Using Your Own Shipping Account")!=-1) { $(".ShippingProviderList").hide(); } </script>
(just wondering, how to insert formatted code blocks ? :P )
@Fred <script> var $shipa = $("#FormField_25"); var $shipb = $("#FormField_26");
if ($shipa.indexOf("Fill This If Using Your Own Shipping Account")!=-1 && $shipb.indexOf("Fill This If Using Your Own Shipping Account")!=-1) { $(".ShippingProviderList").hide(); } </script> is my updated script, in which case the entire page is doing some wierd stuff
its basically taking the entire div that that script is in and not loading it (or hiding it)
hey folks. is there a trick to aligning a static table header with dynamic columns? There are 3 headers and 3 columns. but all columns get shoved under header #1
@rlemon I am working with the script you provided just now, actually got very similar via your jsfiddle from earlier; however I am unable to actually modify that button. the best I can do is encase it within a div IE <div class="ML20"> <input type="submit" value="Continue"> </div>
however unless thousands upon thousands were collected each time... I do think this is a micro optimization - @Neal I would be curious to see some performance data between the two methods on 1000+ elements.
hrm.. does the government not realize newer browser closed off a lot of security vulnerabilities. it would actually be safer and easier on them if they upgraded.
sections on the website: news products links foobar
each with their own controller for 'sub-functions' (most have only a few) and then one Admin controller with add/edit/view/delete functions for all as well... the admin controller is just frikkin huge now. Should I a) lump all admin functions pertaining to the specific sections in their 'section' controller. or have an admin-X controller for each section.