Posts

html - Mobile Button Menu (Drop Down Menu) goes on to of content -

the button when clicked makes menu appear although not push content down, goes on top of , can't see it. i've tried changing position of .navbar nothing works, removed background colour of navbar see whether sidebar , main have disappeared or whether behind (it behind). in advance! <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="styles.css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="script.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--[if lt ie 9]> <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <![endif]--> </head> <body> <header> <i...

responsive design - What type of device is viewing my site? -

hi trying make responsive website, , want find way check whether device viewing page pc, tablet or phone. so far, solution find variations of this: # mobile screen , (min-width: 480px) # tablet screen , (min-width: 768px) # desktop screen , (min-width: 992px) # huge screen , (min-width: 1280px) correct me if i'm wrong, difference in pixel-density in devices big, can't guarantee anything, , require regular updates based on development of new screens higher pixel-density. i hoping there function give screens size in real physical inches, or variable call, tell type device is. the goal have piece of code, never have update, works no matter type of device. i'm language, i'm best @ html, css , javascript. thank in advance! you use media-queries: media-queries or try: responsive webdesign via media-queries @ stackoverflow

dom - moving an object created by JQuery -

i'm sure has come before, can't seem search right wording find related. i have object created jquery. (will 3rd party plugin created it) since created after dom formed, it's not found object jquery. i want appendto() created object. isn't there jquery command says "check if new elements have been added dom? there js mutationobserver method can detect dom tree update. can check if update correspond added object. other helpful question here .

Run JUnit tests in Android studio -

i created new android project , tried run tests (junit) , had follow result: 15:28:53: executing external tasks 'cleantest test --tests com.binomv.rimidalv.tt.*'... failure: build failed exception. what went wrong: problem occurred configuring root project 'tt'. could not resolve dependencies configuration ':classpath'. artifact 'kxml2.jar (net.sf.kxml:kxml2:2.3.0)' not found. searched in following locations: https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed total time: 0.512 secs artifact 'kxml2.jar (net.sf.kxml:kxml2:2.3.0)' not found. searched in following locations: https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar but if use test through device - ok. thank you. -----update----- build.gradle file: apply plugin: ...

javascript - Drop down value depends on radio button selection -

i have 2 radio button name='bb' , have drop down button name='size' should have 2 different option depends on checked radio button. code below ---------------------------------------- <input type="radio" name="bb" id="bb" checked required="true" value="home" > <div>home</div> <input type="radio" name="bb" id="bb" value="office"> <div>office</div> <label>size</label> <select name="bedroom" id="bedroom" style="color: #8e9092; /*height: 38px;width: 228px;*/" > home--- <option value="1 bedroom (350 700 sq ft)">1 bedroom (350 700 sq ft)</option> <option value="2 bedroom (700 1300 sq ft)">2 bedroom (700 1300 sq ft)</option> <option value="3 bedroom (1300 2000 sq ft)">3 bedroom (1300 2000 sq ft)</option> <option ...

java - Swing: JComboBox removing/adding duplicates -

my problem has able add , remove items combobox. items can duplicates. manage add them: jcombobox1.additem(dodatek); remove first: if (jcombobox1.getitemcount() > 0) { jcombobox1.removeitemat(0); or selected one: if (jcombobox1.getselecteditem() != null) { jcombobox1.removeitemat(jcombobox1.getselectedindex()); problem occurs when having items removed, , 1 of them duplicate. in case last item remains selected in combobox though list empty! http://imgur.com/smf2hwg it throws exception when trying remove selected item: exception in thread "awt-eventqueue-0" java.lang.arrayindexoutofboundsexception: array index out of range: -1 @ java.util.vector.removeelementat(vector.java:562) @ javax.swing.defaultcomboboxmodel.removeelementat(defaultcomboboxmodel.java:152) @ javax.swing.jcombobox.removeitemat(jcombobox.java:759) this happens when removing items among there duplicates selected item , selected index don...

c# - Displaying the value of a property from a class according to selected item in listbox -

i made class named product , added different products class in main program this: product1 = new product(); product1.name = "product1"; product1.price = 3.50; product product2 = new product(); product2.name = "product2"; product2.price = 4; and i've got listbox fill method: private void fillproducts(string item) { lstproducts.items.add(item); } so when use method this: fillproducts(product1.name); now want achieve when press button (btnconfirm) see product has been selected in listbox , price of product , display in label lblconfirm.text = "the price of product1 is: " + *the price of product1*; so need display price of product1 in label , don't want use if-statements every single product because there on 200 if-statements. if unclear in question please tell me. just populate listbox product , not string: private void fillproducts(product item) { lstproducts.items.add(item); } use prope...