We're growing into something new. Read More
geoffrey_c

Geoffrey Crofte


Minimal UI in Safari iOS

With the new iOS 7.1, you can now restrict the safari UI to a minimal thing using the viewport meta adding a simple keyword.

Boobstrap - Creative Touch Logo

It's just an idea and speed-designed logotype, but feedback or ideas are welcome :) Thank you.

<table style="background:white" summary="My table summary">
    <tr>
        <td>First data</td>
        <td>Second data</td>
        <td>Third data</td>
    </tr>
</table>

Break specific inline styles using CSS

Sometimes, HTML document is not editable in a project. When you meet an inline style, you have right to be frightened. But there is a solution: the **attribute selector** combine to a bazooka (**!important**)

(function($) {  
	$.fn.juizScrollTo = function( speed ) { 
		if ( !speed ) var speed = 'slow';  
				
		// plugin core
		return this.each( function() {  
			$(this).click( function() {  
				var goscroll = false;  
				var the_hash = $(this).attr("href");  
				var regex = new RegExp("(.*)\#(.*)","gi");  
				if ( the_hash.match("\#") ) {  
					the_hash = the_hash.replace(regex,"$2");  
					if($("#"+the_hash).length>0) {  
						the_element = "#" + the_hash;  
						goscroll = true;  
					}  
					else if ( $("a[name=" + the_hash + "]").length>0 ) {  
						the_element = "a[name=" + the_hash + "]";  
						goscroll = true;  
					}  
					if ( goscroll ) {  
						var container = 'html';  
						if ( $.browser.webkit ) container = 'body';  
						$(container).animate( {  
							scrollTop: $(the_element).offset().top  
						}, speed, function() {
							tab_n_focus(the_hash)
							write_hash(the_hash);

							// your fallback functions here

						});  
						return false;  
					}  
				}  
			});  
		});
				
		// some functions
				
		// write the hash
		function write_hash( the_hash ) {
			document.location.hash =  the_hash;
		}
				
		// keyboard accessibility
		function tab_n_focus( the_hash ) {  
			$(the_hash).attr('tabindex','0').focus().removeAttr('tabindex');  
		}

	};  
			
	// bind all the links
	$('a').juizScrollTo('slow');
		
	// scroll at load
	function trigger_click_for_slide() {
		var the_hash = document.location.hash;
		if ( the_hash )
			$('a[href~="'+the_hash+'"]').trigger('click');
	}
	trigger_click_for_slide();

})(jQuery)

Advanced Smooth Scroll effect with jQuery

This code is an update of my previous code Smooth Scroll with jQuery. This one adds an animated scrolling in your internal anchors. Several features have been added : understand internal anchor made with NAME attribute or ID attribute as target scroll at load support (maybe need another method) keyboard navigation support support fallback functions Ideas and feedback are welcome. More informations : See the demo See the original article (in french) Tested with jQuery 1.6.1. Only works for Y scrolling. Sorry for my english