Search Results

Search found 4 results on 1 pages for 'nailer'.

Page 1/1 | 1 

  • Constant isolate of hovered elements

    - by nailer
    I'm trying to make an element isolation tool, where: All elements are shaded Selected elements, while hovered, are not shaded Originally, looking at the image lightbox implementations, I thought of appending an overlay to the document, then raising the z-index of elements upon hover. However this technique does not work in this case, as the overlay blocks additional mouse hovers: $(function() { window.alert('started'); $('<div id="overlay" />').hide().appendTo('body').fadeIn('slow'); $("p").hover( function () { $(this).css( {"z-index":5} ); }, function () { $(this).css( {"z-index":0} ); } ); Alternatively, JQueryTools has an 'expose' and 'mask' tool, which I have tried with the code below: $(function() { $("a").click(function() { alert("Hello world!"); }); // Mask whole page $(document).mask("#222"); // Mask and expose on however / unhover $("p").hover( function () { $(this).expose(); }, function () { $(this).mask(); } ); }); Hovering does not work unless I disable the initial page masking. Any thoughts of how best to achieve this, with plain JQuery, JQuery tools expose, or some other technique? Thankyou!

    Read the article

  • Why can't my function access a variable in an enclosing function?

    - by nailer
    I know about the LEGB rule. But a simple test of whether a function has read access to variables defined in an enclosing function doesn't seem to actually work. Ie: #!/usr/bin/env python2.4 '''Simple test of Python scoping rules''' def myfunction(): print 'Hope this works: '+myvariable def enclosing(): myvariable = 'ooh this worked' myfunction() if __name__ == '__main__': enclosing() Returns: NameError: global name 'myvariable' is not defined Am I doing something wrong? Is there more to it than the LEGB resolution order?

    Read the article

  • See socket options on existing sockets created by other apps?

    - by nailer
    I'd like to test whether particular socket options have been set on an existing socket. Ie, pretty much everything you can see in: #!/usr/bin/env python '''See possible TCP socket options''' import socket sockettypelist = [x for x in dir(socket) if x.startswith('SO_')] sockettypelist.sort() for sockettype in sockettypelist: print sockettype Anyone know how I can see the options on existing sockets, ie those created by other processes? Alas nearly all the documentation I read on Python socket programming is about making new sockets.

    Read the article

1