This is a very simple lightweight plugin to allow you to move the caret (or cursor) position in an <input /> or <textarea> element.
By exposing three jQuery.fn methods you can easily move a a caret to any position you like:
/* misc useful stuff | |
Alex Buznik (http://buznik.com/) */ | |
.b_catalog { | |
position: relative; | |
font: 0/0 a; | |
} | |
.b_catalog__el { | |
position: relative; |
// Simple side nofitication | |
// cc Alex Buznik, 2013 | |
// demo: http://jsfiddle.net/beshur/mr3DV/ | |
.b_notifyze { | |
position: fixed; | |
z-index: 110; | |
top: 0; | |
right: 0; | |
} |
placeholderSupport = ("placeholder" in document.createElement("input")); | |
if(!placeholderSupport ){ | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
ABACAS => #ABACA5 | |
ABASED => #ABA5ED | |
ABASES => #ABA5E5 | |
ABBESS => #ABBE55 | |
ABODED => #AB0DED | |
ABODES => #AB0DE5 | |
ACCEDE => #ACCEDE | |
ACCESS => #ACCE55 | |
ADOBES => #AD0BE5 | |
ADOBOS => #AD0B05 |
.b_select { | |
position: relative; | |
display: block; | |
margin-top: 1px; | |
margin-right: 29px; | |
padding: 0; | |
color: #000; | |
font-size: 12px; |
These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).
Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on steps 8 to 15.
If you have no idea what I’m talking about, I’ve made a tutorial to install Ubuntu Precise x86 through Windows command-line with Meteor very simple to follow
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>index</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style type="text/css"> | |
html, body { |
window.page_var = {}; | |
window.onload = function() { | |
$(".b_screens__el").each(function (i) { | |
page_var.screens[i] = $(this).offset().top; | |
}) | |
} | |
$(window).resize(function() { | |
$(".b_screens__el").each(function (i) { | |
page_var.screens[i] = $(this).offset().top; | |
}) |
// jQuery function to center the image and stretch it to completely fill | |
// the parent, stretchin either height or width, when needed | |
// | |
// originally written by Ivan Ryzhenko | |
// https://gist.github.com/beshur/7706062 | |
// | |
// Usage: | |
// blockPosition($(img_you_need_to_center), $(optional_relative)); | |
function blockPosition(obj, relative){ | |
obj.each(function(index, element) { |