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.

javascript - Better way to write this jQuery Function? -


basically trying trim down of code, not sure how so, have 9 div's positioned absolute in different spots. grey, when hovered div hovered, fades out , corresponding div fades in. there better way write this?

$('#l1').hover(function () {     $(this).fadeout('300');     $('#l1c').fadein('300') }); $('#l2').hover(function () {     $(this).fadeout('300');     $('#l2c').fadein('300') }); $('#l3').hover(function () {     $(this).fadeout('300');     $('#l3c').fadein('300') }); $('#l4').hover(function () {     $(this).fadeout('300');     $('#l4c').fadein('300') }); $('#l5').hover(function () {     $(this).fadeout('300');     $('#l5c').fadein('300') }); $('#l6').hover(function () {     $(this).fadeout('300');     $('#l6c').fadein('300') }); $('#l7').hover(function () {     $(this).fadeout('300');     $('#l7c').fadein('300') }); $('#l7').hover(function () {     $(this).fadeout('300');     $('#l7c').fadein('300') }); $('#l1c').mouseout(function () {     $(this).fadeout('300');     $('#l1').fadein('300') }); $('#l2c').mouseout(function () {     $(this).fadeout('300');     $('#l2').fadein('300') }); $('#l3c').mouseout(function () {     $(this).fadeout('300');     $('#l3').fadein('300') }); $('#l4c').mouseout(function () {     $(this).fadeout('300');     $('#l4').fadein('300') }); $('#l5c').mouseout(function () {     $(this).fadeout('300');     $('#l5').fadein('300') }); $('#l6c').mouseout(function () {     $(this).fadeout('300');     $('#l6').fadein('300') }); $('#l7c').mouseout(function () {     $(this).fadeout('300');     $('#l7').fadein('300') }); 

$('#l1,#l2,#l3,#l4,#l5,#l6,#l7').hover(function() {     $(this).fadeout(300);     $("#" + this.id + "c").fadein(300); });  $('#l1c,#l2c,#l3c,#l4c,#l5c,#l6c,#l7c').mouseout(function() {     $(this).fadeout(300);     $("#" + this.id.substring(0, this.id.length - 1)).fadein(300); }); 

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 -