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.

css - jQuery draggable + toggleClass problem -


the problem here toggleclass position top:0px; left:0px not trigger.. width , height , background-color activate.. work if not drag div(draggable).. if start drag element, toggled class positioning not effect.. dont know if there's such function in jquery this..

<html> <head>     <title></title>     <script type="text/javascript" src="jquery-1.4.2.js"></script>     <script type="text/javascript" src="jquery.ui.core.js"></script>     <script type="text/javascript" src="jquery.ui.widget.js"></script>     <script type="text/javascript" src="jquery.ui.mouse.js"></script>     <script type="text/javascript" src="jquery.ui.resizable.js"></script>     <script type="text/javascript" src="jquery.ui.draggable.js"></script>     <script type="text/javascript">         $(document).ready(function(){             $("#x").draggable().dblclick(function(){                 $(this).toggleclass("hi");             });         });     </script>             <style>         .hello {             background:red;             width:200px;             height:200px;             position:relative;             top:100px;             left:100px;         }          .hi {             background:yellow;             position:relative;             width:300px;             height:300px;             top:0px;             left:0px;         }     </style> </head>  <body>     <div id="x" class="hello">      </div>     </body> </html> 

the draggable stuff interfering positioning. draggable assign specific left , top css via style attribute drag the <div> around, style attributes override values come class attribute. can around using !important:

.hi {     background: yellow;     position: relative;     width: 300px;     height: 300px;     top: 0px !important;     left: 0px !important; } 

of course, <div> cease draggable once hi class added !important positions override draggable trying do.

i'd recommend webkit browser (such chrome or safari) testing , debugging, webkit's "inspect element" awesome , better else i've come across sorting out html/css issues.


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 -