w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Zoom specific element on webcontent (HTML,CSS,JavaScript)
You could use the zoomooz plugin http://jaukia.github.io/zoomooz/ Inside the documentation check the "Zooming inside a container" section..this is what you may need.. Check the JS Fiddle http://jsfiddle.net/arunberti/KWE6s/

Categories : Javascript

Orthographic camera zoom with focus on a specific point
The camera's orthographicSize is the number of world space units in the top half of the viewport. If it's 0.5, then a 1 unit cube will exactly fill the viewport (vertically). So to zoom in on your target region, center your camera on it (by setting (x,y) to the target's center) and set orthographicSize to half the region's height. Here is an example to center and zoom to the extents of an object. (Zoom with LMB; 'R' to reset.) public class OrthographicZoom : MonoBehaviour { private Vector3 defaultCenter; private float defaultHeight; // height of orthographic viewport in world units private void Start() { defaultCenter = camera.transform.position; defaultHeight = 2f*camera.orthographicSize; } private void Update() { if (Input.GetMouse

Categories : Unity3d

Chrome Zoom issue: absolute Div top position changed while zoom ( Ctrl + )
The only thing I can suggest that should maintain the same appearance under zoom is to have your table and your "apptest" div in the same container: <div class="container"> <table class="custom">...</table> <div class="apptest"></div> </div> See the fiddle: http://jsfiddle.net/mJcsb/4/ You're at a mercy of a completely proprietary algorithm though (Chrome's Zoom algorithm) so any irregularities in layout under zoom are completely possible.

Categories : HTML

JavaScript set focus to HTML form element
Do this. If your element is something like this.. <input type="text" id="mytext"/> Your script would be <script> function setFocusToTextBox(){ document.getElementById("mytext").focus(); } </script>

Categories : Javascript

zoom-in & zoom-out is not working in chrome
Your -webkit-transform value does not match the other two transforms; it says scale(1) instead of scale(1,1). Try using these lines: $("#Page").css( "-webkit-transform", "scale(1,1)" ); $("#Page").css( "-webkit-transform", "scale(2.4,2.4)" );

Categories : Javascript

Chrome Content Script to Modify HTML Element
You can do this by including the JQuery library in your extension and then you can make this change with one line of code. $("font[style='color:white;']").css("background-color","black"); This will identify all font elements with the style color:white; and append background-color:black;. You can see it in action here Here's how to include JQuery in your extension: Just remember to include the jquery.js file in your extension root. { ... "content_scripts": [ { "matches": ["http://www.whateveryoulike.com/*"], "js": ["jquery.js", "myscript.js"] } ] ... }

Categories : HTML

Unable to access HTML element from external js in Chrome Extention
I was tested your code and it doesn't work, i think the content page wasn't loaded completely, So it's preferred to use jQuery accompany this code in your "getMSG.js": $(document).ready(function () { document.getElementById('content').innerHTML = 'Hello'; }); Works fine for me.

Categories : Javascript

How to capture a screenshot of a single HTML element in Chrome extension?
For this you need onMessage, sendMessage, and captureVisibleTab. The onMessage is a method of chrome.runtime, sendMessage, and captureVisibleTab are both methods of tabs. Manifest In the manifest file you must to add the tabs, and <all_urls> permissions to your manifest file. This will not work without the permissions. "permissions": [ "tabs", "<all_urls>" ], Content Script In your content script file you need to add the following. This allows you to communicate with your background page to take a screenshot of your active tab. chrome.runtime.sendMessage({ chromeAction: "screenshot" }, function (imageString) { console.log(imageString); }); Background Script/Page Here is where the magic happens. chrome.runtime.onMessage.addListener(function (request, sende

Categories : Google Chrome

webview lose focus after I click outside it and never zoom in or out again android
The problem happen to me because I was using view pager with DepthPageTransformer and add it one of it's fragment my webview, the problem solved when I use the default Transformer of the view pager

Categories : Android

How to apply CSS setting to specific HTML element
Set a max-width for long names and put an ellipsis to show this: <span class="username"> Welcome <?php echo $_SESSION['userName'] ?> </span> CSS .username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: x px; /* set this to what you need */ }

Categories : HTML

search on specific element in HTML with jquery
$('.simple-list02:not(:has(h5:contains(' + searchTerm + ')))').hide(); The code above only hides, though. You may want to show all elements first, and then hide the ones that don't match, if the text changes. $('.simple-list02') .show() .not(':has(h5:contains(' + searchTerm + '))').hide(); Demo Note that :contains is case sensitive. If you want something more advanced you may pass the set of simple-lists through a .filter function: $('.simple-list02') .show() .filter(function() { return $(this).find('h5').text().toLowerCase() .indexOf( searchTerm.toLowerCase() ) == -1; }) .hide(); Additionally, you could roll your own :contains selector, as explained in this blog post: // pre 1.8 jQuery.expr[':'].contains = function(a, i, m) {

Categories : Jquery

show div B on element A focus & hide element B on element B blur
well.. as you have said , when we focus on on A the click event of body is called...the way around for avoiding this is to check if the element is .B or its desendent, then don't hide().. fiddle here .. $(function () { $('.A').on('click', function () { $('.B').show(); }); $(document).on('click', function (e) { if (!$('.A,.B').is(e.target) && $('.A,.B').has(e.target).length === 0) { $('.B').hide(); } }); });

Categories : Jquery

JQuery - Remove specific element tags (but not the HTML) from within 'this'?
Try this, $(function(){ $('tr').each(function(){ console.log('<li>'+$(this).text()+'</li>') $(this).html('<li>'+$(this).text()+'</li>'); }); }); Fiddle http://jsfiddle.net/wwSGV/1

Categories : Javascript

hide specific child element from an html using prototype
I think this is what you are looking for. $$('#category_1 ul').first().hide(); See fiddle I hope it helps.

Categories : Misc

How do I target a specific element nested in HTML/CSS code?
Check this Fiddle Give border-top and border-bottom to you li and target your #logo with border:none; this will solve your problem. And for the gap you can see in between li elements this can be solved by setting the parent elements font-size:0; and then define the font-size:npx to your li element. HTML <ul id="nav"> <li><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> <li><a href="portfolio.html">Portfolio</a></li> <li id="logo"><a href="index.html"><img src="http://placehold.it/50x50/" /></a></li> <li><a href="projects.html">Projects</a></li> <li><a href="contact.html">Con

Categories : HTML

Wrap specific part of string with HTML element
Easiest way to achieve this is: $('h1').each(function (_, el) { var $this = $(el); var h1Content = $this.html(); $this.html(h1Content.replace(/(d+)/, '<span>$1</span>')); }); This assumes you want the first number. DEMO

Categories : Javascript

On focus, focus on another element jquery
EDIT: Fixed the selectors $('#cssmenu > ul > li > a').focus(function () { $(this).parent().find('ul li a').first().focus(); }); Try that. Read up on jQuery's selectors: http://api.jquery.com/child-selector/

Categories : Jquery

How to plot an HTML element on a v3 Google Map at a specific latitude and longitude?
You will have to do it using overlays. Check here for a detailed example. You can customize it to include the text part and of course the right coordinates

Categories : Javascript

How to parse and extract a specific element from a HTML document in Python?
To parse using a library - the best way is BeautifulSoup Here is a snippet of how it will work for you! from BeautifulSoup import BeautifulSoup src = "<html><body>...<div id=content>AAA<B>BBB</B>CCC</div>...</body></html>" soupy = BeautifulSoup( src ) content_divs = soupy.findAll( attrs={'id':'content'} ) if len(content_divs) > 0: # print the first one print str(content_divs[0]) # to print the text contents print content_divs[0].text # or to print all the raw html for each in content_divs: print each

Categories : Python

Add element to existing html using specific location using id and class using prototype insert
In PrototypeJS $('filter') selects element with id="filter". If you want to select by class, then use $$ function. Something like this: $$('.filter')[0].insert("<th><div class='field-100'></div></th>"); But I'd recommend either changing class name to something more unique, or use id instead of class.

Categories : Misc

1 pixel of background repeat during zoom in Google Chrome
Subtract 1px from everything, including the background x-position. .red-div{ background-color: red; height: 29px; width: 300px; } .child { width: 100%; height: 100%; background: url('') repeat-x; background-position:-1px 100%; } JSFiddle

Categories : Javascript

$.focus() not working in chrome
The reason this happens is that the main part of the page isn't allowed to take focus away from the dev tools window, so when you're in the console tab, the main part of the page can't take focus away from it. Very annoying, run your code in a script and it should work.

Categories : Jquery

jQuery focus not working in Chrome
You should use: $("#one").on("keyup paste",function() { console.log($(this).val()); if($(this).val().length == 2) { $("#two").focus(); } }); DEMO And the same for #five handler oninput event seems to have specific behaviour as onkeypress.

Categories : Javascript

Chrome Breakpoint for changing focus isn't working
I think this is a bug, I found a way to figure this out. essentially I added an onFocus function to anchor tag in question and made an alert with the following code: alert(arguments.callee.caller.toString()); This shows who was calling the onFocus, and it actually worked, so I think this means it is a chrome specific bug. I had to add the onFocus with javascript due to the code being in a taglib and no onFocus attribute available, but it worked.

Categories : Debugging

Checkboxes do not receive the focus when clicked on Chrome
You can also solve it like this $(function () { $("input[type=checkbox]").click(function (event) { $(this).parent().css("background", "red"); }); })

Categories : Javascript

Chrome losing focus while typing on Google pages
This was encountering the problem: http://www.webpagescreenshot.info/ It probably updated itself and new version have this bug. So I replaced this with Screen capture from Google

Categories : Google Chrome

How to steal focus from the omnibox in a Chrome extension on the new tab page?
Hello from my question you linked! On your New Tab Page, include the following JavaScript: chrome.tabs.create({ url: chrome.extension.getURL("foo.html") }); window.close(); This will create a "normal" tab, and then close the New Tab Page. You can then focus() your input box on the normal tab. This is what I've done for my Fauxbar extension. It adds a slight delay when clicking Chrome's New Tab button (in terms of how long it takes for your input box to become focused), but I reckon it's better than having to press Tab. You could also implement chrome.commands to create keyboard shortcuts that users can modify themselves under chrome://extensions > Keyboard shortcuts.

Categories : Javascript

window focus not working in chrome when switch tabs
Check out this answer, you could easily modify that code to complete the task you've outlined here.

Categories : Javascript

How to avoid click on lower html element when clicking on the html element above it on touch devices?
you should use event.stoppropagation(): $('your-element').on('click', function(e){ e.stopPropagation(); // other stuff here }) That should solve your problem.

Categories : Android

Why when launching Chrome and loading html file to chrome it's taking so much time to load it?
I think that is because the page you are trying to load has its html part in other file and other elements belonging to same page are in a folder,not to mention designer webpages and sites have hundreds and thousands of elements in them.From elements i mean separate stylesheets,separate script files,graphics such as images including site banner and others etc.Assigning hundreds of elements to correct places obviously takes some time. My opinion would be to first change the following setting in Chrome(To change them type 'chrome://flags' (without quotes) and press Enter button this will bring you to internal settings page of Chrome).Once you have settings page opened locate following setting Save Page as MHTML and Enable it,then try to download the page again.Then use this co

Categories : C#

On hovering mouse on image to zoom magento displaying zoomed image twice either on zoom and in background zoom block
first of all thanks for posting your site URL. As i trace your html code on live site. To solve your issue that would be 2 ways to solve it. 1) As i seen your third image has white background so it is not visible in background of same image when we are applying zoom effect on it, but another 2 images of mug are display in back ground, the main thing i notice that for 2 mug images are transperant images and 3rd one is not transparent. so here i am suggesting to you to make background of image white or 2) You can apply effect of color when user will show image in zoom. Let me know if i can help you more.

Categories : Image

Chrome: Is it possible to detect losing window focus to the javascript console?
window.onfocus? I really don't understand what do you mean but look at this references. Search for "events": DOM document reference DOM reference Hope it help you!

Categories : Javascript

Jquery focus/submit acting weird in Chrome-Browser
Well, that is because, when you try to click the button, it focuses out and the focusout event is fired and button is hidden. to resolve this you can do this. $("#helpkontakt textarea, input, select, #submit").focusout(function() { setTimeout(function(){ $("#helpkontakt").css("height", "200px"); } ,100); }); Demo

Categories : Javascript

Are the click and focus events on a textbox in the wrong order in Chrome?
I assume this is because whereas in other browsers the click event is raised before the focus event, in Chrome its the other way round? Don't assume, test. (The same thing happens in Firefox, btw.) You can work around the problem by using setTimeout: Fiddle $("input:text").focus(function() { var $this = $(this); setTimeout(function(){ $this.select() }, 0); });

Categories : Jquery

XAML/WPF zoom to a specific area on a canvas
I'm not sure if I fully understood your question. maybe pasting the xaml code would help. Potentially you can work with the "margin" property of the canvas: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <!--clip to bounds for hide parts of the canvas--> <Viewbox ClipToBounds="True"> <!--set margin negatively to zoom out of the viewbox size--> <Canvas Margin="0,0,-100,-100" Width="200" Background="Red" Height="200"> <Rectangle Width="100" Height="100" Fill="Gray"/> </Canvas> </Viewbox> </Grid>

Categories : C#

Zoom in on an element while still being able to navigate page
Here is an example of what you could do... http://www.sitepoint.com/html5-javascript-mouse-wheel/ and http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html However I would consider the above as a secondary option. There are many other ways to present the presentation and embed it onto your page. A slider is limited to "slide" only. You can for example use a presentation software and embed it onto your page as a widget e.g. http://prezi.com/ as freeware. Hope that helps.

Categories : Javascript

Chrome does not trigger focus and blur events for document in content editable iframe
According to http://api.jquery.com/focus/, focus can only be used on certain elements (mostly form elements). You probably need to look into catching a click event from within the iframe on the body tag to figure out if a user is interacting with it.

Categories : Javascript

Is it possible to restrict map panned, drag and zoom for a specific city?
No Google map is not providing any city limit access. It has a country restriction. Or you have to write a logic to limit access only to a certain distance from the given point. If user drag after that distance then point back to the given Geo-point location.

Categories : Google Maps

Scale Absolute Positioned Element in IE8 with Zoom
I am working out a similar issue. Try zoom: .43; I have run across issues with the zoom property in IE8, however - which is how I happened to run across this post. Let me know how this works for you! UPDATE: I found this which seems to work better for me. Your mileage may vary: -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.43, M12=0, M21=0, M22=0.43, SizingMethod='auto expand')";

Categories : CSS

Styled Maps: How can I control visibility of elements for specific zoom level?
It's done by creating different google.maps.StyledMapType objects with different styles, and then setting an event listener to listen to the 'zoom_changed' event of the Map object. This should give you some idea: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Custom Styled Map</title> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script> /*** SEE: https://developers.google.com/maps/documentation/javascript/styling ALSO, GOOGLES STYLED MAP WIZARD: http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html ***/ function initialize() { var gm = google.maps, darkStylers = [ {stylers:[{invert_lightness:true}]} ], lightStyler

Categories : Google Maps



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.