
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
jquery-pixel-perfect
Advanced tools
Simple jQuery extenstion for convenient work with design mockups in browser
A simple tool for convenient work with design mockups in a browser
jQuery-Pixel-Perfect is a small plugin that conveniently allows you to transpose a design layout over a developed site. With jQuery-Pixel-Perfect, you do not need to make measurements and you can write CSS code that pixel-matches to the design layout.
Browser:
<script src="https://code.jquery.com/jquery.js" type="text/javascript"></script>
<script src="jquery-pixel-perfect.js" type="text/javascript"></script>
Common JS:
require('jquery');
require('jquery-pixel-perfect');
Create an overlay image for page you are coding and put it in any folder in your project. For example in ../images/mockup.png
$(document).ready(function() {
$('body').pixelPerfect();
});
Use the following buttons:
You can actually change the default parameters (like actions of keyboard keys, image path, mockup draggability). To do so, you need to specify the input parameters in the jQuery-Pixel-Perfect method.
$(document).ready(function() {
$('body').pixelPerfect({
path: 'images/mockup.png', //default mockup path
draggable: true, //draggable state
topBtnCode: 38, //default is "Up arrow" key
rightBtnCode: 39, //default is "Right arrow" key
bottomBtnCode: 40, //default is "Bottom arrow" key
leftBtnCode: 37, //default is "Left arrow" key
opacityIncBtnCode: 81, //default is "Q" key
opacityDecBtnCode: 87, //defauls is "W" key
positionBtnCode: 70, //default is "F" key
visibilityBtnCode: 83 //default is "S" key
});
});
P.S. Here you can find the full table with keyboard keys code
FAQs
Simple jQuery extenstion for convenient work with design mockups in browser
We found that jquery-pixel-perfect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.