Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

jquery - What is the most common waste of computing power in Javascript? -


we've seen people this:

jquery('a').each(function(){     jquery(this)[0].innerhtml += ' proccessed'; });  function letspolutens() {     polute = '';     (morepolution = 0; morepolution < arguments.length; morepolution++)         polute.join(arguments[morepolution]);     return polute; } 

and on. wondering people have seen common javascript/jquery technique slowing down page and/or wasting time javascript engine.

i know question may not seem fit what's accepted question, yet i'm asking "what common accepted waste?"

i'm guilt of this. using element's class in jquery selector. instead of combining class selector elements tag name.

<div></div> <div class="hide"></div> <div class="show"></div> <div class="hide"></div> <div class="hide again"></div> 

$(".hide").hide(); 

instead of quicker

$("div.hide").hide() 


also inefficient, many people don't make use of context parameter selectors

$( selector, [ context ] )


   $("#mydiv").click(function () {       $("#mydiv span").show();    } 

which can handled better this:

   $("#mydiv").click(function () {       $("span", this).show();    } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -