• This repository has been archived on 18/Apr/2023
  • Stars
    star
    117
  • Rank 300,840 (Top 6 %)
  • Language
    HTML
  • License
    MIT License
  • Created about 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Small bootstrap js plugin to enhance porte-folios and image galleries.

bootstrap-magnify

bootstrap-magnify is a small js plugin to enhance porte-folios and image galleries.

Installation

bower install bootstrap-magnify

What it does

This plugins adds a magnifying glass to images on mouseover. This is useful in porte-folios when you want to show details of your creation but you don't have the layout space to display your 1200px wide image.

The images used are large images, shown at a smaller resolution on the website, the magnifying glass shows a small part at the native resolution. Keep in mind that large images are heavy and you must not abuse from this technique.

Screenshot

If you want to show the large preview at a 200% ratio, just use an image twice the size of it's container.

How to use it in 3 easy steps

1. Add the styles

Import the css file in the head of your website

    <link rel="stylesheet" href="bootstrap-magnify.min.css">

Or import it at the end of your bootstrap.less file

    // ...

    // Magnifying glass
    @import "bootstrap-magnify.less"

2. Add the script

Import the script at the bottom of your page, after jQuery.

    <script src="js/bootstrap-magnify.min.js"></script>

3. Call the script

Now, there is two way you can trigger the functionality. The easy-way, which requires zero lines of javascript is using the data-api. Just add data-toggle="magnify" to your image like this:

    <img data-toggle="magnify" src="image.jpg" alt="">

Or, you can call it manually in javascript like this :

    $('.container img').magnify();

License

bootstrap-magnify is released under the MIT License. See the bundled LICENSE file for details.

More Repositories

1

ObHighchartsBundle

Symfony Bundle that aims to ease the use of highcharts to display rich graph and charts in your Symfony application
PHP
164
star
2

StatusBoard

Generate StatusBoard widgets like a boss!
PHP
27
star
3

excel-art

It's like pixel art, but with Excel.
Python
10
star
4

hotlink-watermark

Add a watermark to images requested from another domain
PHP
8
star
5

dotfiles

My default configs for OSX
Shell
8
star
6

silex-skeleton

My starting point for Silex projects
PHP
7
star
7

ObCmsBundle

Simple CMS bundle for Symfony2 websites
PHP
4
star
8

hex

Hex is a sandbox where I try stuff and learn about DDD, Hexagonal Architecture and CQRS/ES.
PHP
4
star
9

silex-heroku-hello

Hello world Silex app with instructions on how to deploy on Heroku
PHP
3
star
10

hooker

Sensible git hooks for your projects.
PHP
2
star
11

inkless

A less version of Zurb's ink stylesheet, in case your email is not exactly 580px wide
CSS
2
star
12

confoo-2021-serverless-python

Just a toy application for my introduction to serverless @ Confoo 2021.
Python
2
star
13

Nuke

Symfony2 bundle that provides a nice button to annihilate your cache from the comfort of your browser.
PHP
1
star
14

simple-backup-cron

A simple bash script to backup remote databases and folders.
Shell
1
star
15

zend1-composer

Just a proof of concept of using Composer to install and autoload Zend 1 and ZendX.
PHP
1
star
16

library

My RSS reading list under version control
1
star
17

confoo2020-asyncio

Example from my asyncio talk at Confoo Montreal 2020
Python
1
star
18

watson-statusbar

A GUI wrapper around watson, the CLI time tracking app by TailorDev.
Python
1
star
19

marcaube.github.io

My personal website
HTML
1
star
20

Pairfony

Repo for the http://pairfony.com website, the place where passionate PHP developers meet to perfect their craft. Read http://marcaube.ca/2013/10/pairfony/ for more details ...
PHP
1
star