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 - jQuery not doing what I want it to do -


i'm having trouble little jquery, , thought in community me out? so, markup follows:

<div class="left">     <ul id="editing-nav">         <li><a class="active testforso" href="#testforso">test so</a></li>         <li><a class="testforso2" href="#testforso2">test so2</a></li>         ...and on.     </ul> </div>  <div class="scroll">     <div class="scrollcontainer">         <div id="testforso">             ...some content         </div>         <div id="testforso2">             ...some content         </div>         ...and on.     </div> </div> 

so, - .left floated left, , .scroll on right side. looking way active nav element (by default, first one, , when user click one, it'd assign element class of ".active" , remove previous one's active class)'s co-insiding div has display:block, while others hide. i'm doing inside of fancybox, makes little bit more complicated, here's have -

$('#editing-nav li > a').click(function() {         $('#editing-nav li > a').removeclass('active');         $(this).addclass('active');         activeclassid = $(this).attr('class');  // grabs nav class id show in .scroll         var dividtoshow = ('.scroll .scrollcontainer #') + activeclassid;       // grabs dom path & id of coinciding div show             dividtoshow = dividtoshow.replace(' active', ''); // removes " active" class (because before have class of "testforso2 active"; has "testforso".         $('.scrollcontainer div:not(#' + dividtoshow + ')').hide();         $('.scrollcontainer #' + dividtoshow ).show();     }); 

this works first link clicks, not after that. don't know if clear earlier, class #editing-nav li co-incides div show inside of .scroll.

any ideas? i'm not sure why it's doing this... thank you!

this issue id selector - try this instead

edit

figured out real issue here - not sure why works first time dividtoshow variable contains information. see here cut down version


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 -