background preloader

NewSite

Facebook Twitter

SeyDoggy/sdSmartNav. Jquery - hiding an element on click of anything else on the page. Demo | jQuery.popeye 2.1 | an inline lightbox alternative with slideshow. X Note: To see the full potential of CSS3 styling (shadows, gradients, rounded corners, alpha transparency), please view this page in a modern webkit or mozilla browser (Firefox 3.5+, Safari 4, Opera 10.50, Chrome 4). Other browsers will degrade gracefully.

Except for IE6, though, which I didn't bother to include. Feel free to come up with your own solution ;-) Example 1 The first popeye-box uses the standard options: it floats to the left and opens to the right, its navigation and caption show on mouseover. By placing the navigation inside the stage area (where the image is displayed), we can get it to hover above the image.

No need to read this, just dummy text ;-) Vivamus ut nisi id libero interdum pretium. View HTML code used in this example Example 2 The navigation stays fixed to the right of the image. There is no enlarge button, but a click on the image enlaregs and shrinks it nevertheless. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. View HTML code used in this example.

ViewPort

Checking if an element is visible on-screen using jQuery. By Sam Sehnert Download jQuery VisibleView Demo We recently built a little jQuery plugin which allows us to quickly check if an element is within the browsers visual viewport, regardless of the scroll position. If a user can see this element, the function will return true. ? The visual viewport is the part of the page that? S currently shown on-screen. The user may scroll to change the part of the page he sees, or zoom to change the size of the visual viewport.? This method differs from the jQuery :visible selector in that visible checks to see whether the element is hidden using css (basically if offsetWidth or offsetHeight is 0). Usage In its simplest form, the element can be used as follows: $('#element').visible() This method will return true if the entire element is visible (I.e., it will return false if any part of that element is outside the viewport.Passing true to the ‘visible’ method, will tell the plugin to return true if ANY part of the element is visible on the users screen.

jQuery – test if element is in viewport (visible on screen) | upshots. Html - autoresize div when side bar expand using jquery animate. Kick-Start Your Project: A Collection of Handy CSS Snippets. Don't start your project with an empty style sheet: there are many great snippets that can make your life easier and speed up web development. We are going to show you some handy snippets that you might find useful for kick-starting your next project. In one of the previous articles “Basic Ready-to-Use CSS Styles”, we saw how we could create a suite of classes to help the design process while making a website. I hope you made your own set of patterns! Today we are going to see how we can continue this exercise with some things a little bit more technical. I’ll show you a bunch of CSS snippets you may or may not know, which can dramatically increase your CSS development speed.

Indeed, isn’t there some properties or CSS tricks you always have to check the syntax for, every single time you want to use them? Of course you do my friends! Before we go, let me tell you how I divided this article: Shorthand classes Let’s begin with shorthand classes, which are a very common things. Nothing more. Some Useful JavaScript & jQuery Snippets - Part 3. How to hide all children div except a specific one with jQuery? $('#target div:not(#exclude)').hide(); //or $('#target').children().filter(':not(#exclude)').hide(); Detecting when a div’s height changes using jQuery $('element').bind('resize', function(){ alert( 'Height changed to' + $(this).height() ); } Delete all table rows except first $('someTableSelector').find('tr:gt(0)').remove(); Selecting root element of a certain level in the document 1 level: $('*:not(* *)'); […] How to hide all children div except a specific one with jQuery?

Detecting when a div’s height changes using jQuery Delete all table rows except first Selecting root element of a certain level in the document Searching a string in jQuery Get the distance scrolled from top Select all elements except the ones with a given classAdd a row to a table How to convert decimal to hexadecimal? Filtering By More Than One Attribute in JQuery How to expire a cookie in x minutes Selecting the first x items with jQuery. Visual thesaurus using arbor.js. Wow, I can’t believe we are at the end of January – one twelfth of the year gone already! I’ve been so busy this month I’ve barely had time to sit down and work on any personal projects. Thankfully I had a spare few hours over the weekend to work on a project I’ve been meaning to finish for a couple of weeks: a visual thesaurus using JavaScript.

Visual thesaurus representation of the word 'clean'. You may (or may not) know of the Visual Thesaurus by Thinkmap; very useful but it’s a paid for service, I use it so infrequently I can’t justify paying for it (there is a free trial though). Recently a very interesting graph visualisation library popped up on delicious called arbor.js, so I decided to have a closer look and see if I could use it for the JavaScript version.

For the word data I’ve used the Bighugelabs thesaurus API which I previously used to create my Post Thesaurus WordPress plug-in (shameless plug!). So to the demo; I’ve tried to keep it very simple to use. Arbor Js - Node Onclick. Svg.js - A lightweight JavaScript library for manipulating and animating svg. TransBox Stack by Maik Barz. MyMenu stack. This page features myMenu with the "Float" option applied, and as the setting suggests, the menu will "float" up and down the page as you scroll. This very clean and smooth animation is unobtrusive and quite eye-catching, making it a great way to spruce up any RapidWeaver site that needs a bit of punch.

Also note the additional custom menu items. These are custom links you can add to the myMenu stack. In fact, you can also choose to hide the site menu items and only display your own custom items if you prefer, complete with their own sub pages! In additional to being able to add your own custom items, you can also choose where they are displayed. in this case, they are shown after the built-in site nav items, but you can also choose to display them before the site nav items. For a more detailed explanation of the options listed in the HUD, feel free to visit the myMenu Online Manual .

How to stop your images appearing in image results | Tutorials | WillWoodgate.com. We spend hours meticulously optimising our websites to appear at the top of Google. However having lots of images show up in image searches can sometimes be bad news for website owners. Your images may show up next to images from other people you wish to have no association with (searchers might confuse your images with images by other people). Likewise images listed in the image results page can quickly become a soft target for hot-linking and copyright infringement.

People sometimes mistakenly think anything shown in Google or other search engines is free for them to take and use. There are many other legitimate reasons why you might want to display images on your own website, but opt-out from having them displayed in image search results. Information is thin, because naturally Google (and others) want to try to build the most comprehensive search database on the planet. Once again, the trick here is to create a robots.txt file. What to put in the robots.txt file Put it all together. Initializr - Start an HTML5 Boilerplate project in 15 seconds!

NiceElements