This is a jQuery UI widget to point a element in iframe like FireBug or DOM inspector.
- Really experimental
- Wittern in CoffeeScript, the source is jquery-inspector.js.coffee
- Requires jQuery and jQuery UI
- Developed with jQuery 1.8.2 and jQuery UI 1.9.0 but not tested with others
- Currently not to support IE
- Requires server side script to proxy HTTP in order to avoid domain security
// Setup $('iframe').inspector({ proxyUrl: 'proxy.php', onPick: function(picked) { var path = this.selectorPath(picked, ' '); console.log(path); this.highlight(path); } }); // Load. Do not use src attribute of iframe directly $('iframe').inspector('load' 'http://example.com'); // Start to pick $('iframe').inspector('pick'); // Suggest selector path of element $('iframe').inspector('selectorPath', element); // Highlight elements $('iframe').inspector('highlight', selector); // Add highlighted elements $('iframe').inspector('highlight', selector, true);
URL of HTTP proxy script.
See dev/proxy.php as reference.
Parameter to pass target URL to proxy URL.
Style of hover element points element in iframe.
background-color:red;opacity:0.3;
Style of highlighted element.
border:2px solid #f00 !important;opacity:0.3;
Message to show when a user moves to an another page.
Content of iframe needs same-origin proxyed URL, so prevent in beforeunload.
I want to know other ways.
Selector of clickable elements to stop 'click' events during picking.
Callback before load URL.
Callback after load URL.
Callback when element hovered in picking.
Callback when element selected in picking.