show-hide

How to hide and show MarkerClusterer in google maps

梦想与她 提交于 2019-11-30 07:18:04
i'm trying to hide/show markerClusterer when user clicks some buttons: Here is what i'm trying to do: map = new google.maps.Map(document.getElementById("mappa"),mapOptions); var marker_tmp = []; var markers_tmp = []; $.each(json,function(index,value){ var latLng = new google.maps.LatLng(value.lat,value.lng); var marker = new google.maps.Marker({'position': latLng}); if((value.candidato in markers_tmp)==false){ markers_tmp[value.name]=[]; } markers_tmp[value.name].push(marker); }); for(var name in markers_tmp){ markers[name]= new MarkerClusterer(map,markers_tmp[name]); } I create multiple

Show/Hide Div on Scroll

末鹿安然 提交于 2019-11-30 04:13:48
I have a div that sits at the bottom of a slideshow that I want to disappear when the user scrolls or uses down arrow then reappears when scrolls back to the top. I am guessing this is incorporating the jquery scroll functionality? Priyank Patel <div> <div class="a"> A </div> </div>​ $(window).scroll(function() { if ($(this).scrollTop() > 0) { $('.a').fadeOut(); } else { $('.a').fadeIn(); } }); Sample $(window).scroll(function () { var Bottom = $(window).height() + $(window).scrollTop() >= $(document).height(); if(Bottom ) { $('#div').hide(); } }); Madhavi Mangapati Try this code $('window')

Show/Hide <select> dropdown, with jQuery, based on value

不羁岁月 提交于 2019-11-30 03:22:56
问题 I'm trying to build a custom dropdownlist wich show/hide a second set of dropdowns based on it's selection. I was wondering if anyone here might be able to help with a solution to this. You can view my code at http://jsfiddle.net/prodac/stAAm/ 回答1: use the jquery :selected a little bit of documentation is here http://api.jquery.com/selected-selector/ That works in an option select menu I am updating your Jfiddle now if you can give me a little more info about what you want done. Edit Here is

What is the simplest way to implement pure css show/hide?

我的梦境 提交于 2019-11-29 14:21:10
问题 I discovered the <details> element for html5, and that made me want to determine whether it was possible to implement a simple and reusable show/hide via css alone. I have created a show/hide mechanism in the past for showing and hiding content by giving two elements relative positioning and one a negative z-index, and then decreasing the z-index of the front element on hover (and increasing the z-index of the back element on hover). However, that method only works for elements that are in

Show/hide div on button click

浪子不回头ぞ 提交于 2019-11-29 11:31:18
I am trying to show and hide content depending on which button is pressed. The next button should show content 2 and hide content 1, and previous button should do the opposite. <script type="text/javascript"> $('a.button-next').click(function() { $("#tab-content2").addClass("show"); }); </script> CSS: #tab-content2 { display: none; } #tab-content2.show { display: none; } HTML: <div id="tab-content1"> <?php the_content(); ?> </div> <div id="tab-content2"> <?php the_field("experience");?> </div> <a href="javascript:;" class="button-back">Previous</a> <a href="javascript:;" class="button-next"

Show/Hide script using javascript

本小妞迷上赌 提交于 2019-11-29 11:09:28
I have a show/hide script that I am using for a menu. When I click a main link it brings up a list below it. I was wondering if there is a way to alter it a bit so that when I click the link it opens but when I click the next one it closes the other one instead of leaving them all open unless you click it again to close. Here is my script: <script type="text/javascript"> function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } </script> <a href="#" onclick="toggle_visibility('list1');"> <p

android layout with visibility GONE

≡放荡痞女 提交于 2019-11-29 10:51:59
问题 Four views are using same xml. I want to show a linear layout for view 1 only. I put android:visibility="gone" in xml. And then I am doing the following for view 1 - LinearLayout layone= (LinearLayout) view.findViewById(R.id.layone); layone.setVisibility(View.VISIBLE); But that doesn't set the visibility to visible. Isn't it possible to show the view once its declared GONE in xml ? I don't want to converse the logic by just doing, layone.setVisibility(View.GONE); in each of the three views

How to hide and show MarkerClusterer in google maps

谁都会走 提交于 2019-11-29 10:01:59
问题 i'm trying to hide/show markerClusterer when user clicks some buttons: Here is what i'm trying to do: map = new google.maps.Map(document.getElementById("mappa"),mapOptions); var marker_tmp = []; var markers_tmp = []; $.each(json,function(index,value){ var latLng = new google.maps.LatLng(value.lat,value.lng); var marker = new google.maps.Marker({'position': latLng}); if((value.candidato in markers_tmp)==false){ markers_tmp[value.name]=[]; } markers_tmp[value.name].push(marker); }); for(var

How does jquery's show/hide function work?

为君一笑 提交于 2019-11-29 09:53:35
I have a bit of an issue with a toggle visibility function which operates on the hidden attribute of an element. Trouble is, this lacks browser compatibility.. function hide(e) {$(e).hidden=true;} function show(e) {$(e).hidden=false;} Googling this issue I came across the method of toggling the style.display property, like so.. function toggle(e) { document.getElementById(e).style.display = (document.getElementById(e).style.display == "none") ? "block" : "none"; } ..but this seems sub-optimal, because you can't have a generic show/hide function that sets the display property to block . What if

How to show/hide Actionbar when clicked on [closed]

岁酱吖の 提交于 2019-11-29 07:59:26
When the user clicks anywhere on the screen, I want the Actionbar to hide and when pressed again it should reappear. I know there is something called actionbar.hide(); and show, but can you please help me how to implement it? :) Just hide() : getActionBar().hide(); when you want to hide it, and use show() : getActionBar().show() when you want to show it. That's about it. Remember that if you're using View.SYSTEM_UI_FLAG_FULLSCREEN , this will not work properly. Try this. you have here the possibility to call hide or show method and according to your proposal public class AbstractActivity