Search Results

Search found 2 results on 1 pages for 'x3sphere'.

Page 1/1 | 1 

  • Dealing with multiple parameters in Nginx rewrite

    - by x3sphere
    I have a rewrite that nginx calls like so: location ~* (css)$ { rewrite ^(.*),(.*)$ /min/index.php?f=$1,/min/$2 last; } And it's used on pages like this: http://domain.com/min/framework.css,dropdown.css Works all fine and dandy, but it's not scalable. Adding another element to the URL means I have to directly edit the nginx config. Ideally, I'd like to have nginx rewrite according to how many comma-delimited parameters are passed through the URL, rather than setting a fixed amount in the config. Is this possible?

    Read the article

  • jQuery class selector oddness

    - by x3sphere
    I'm using jQuery to change the background image of a button depending on the class associated with it on hover. It only works if I put the hover statements in separate functions, however. Why is this? Here's the NON working code, always evaluates to the .submit hover statement, even when that class is removed via the keyup event. $(function() { { $('.submit-getinfo').hover(function () { $(this).css( {backgroundPosition: "right bottom"} ); }, function() { $(this).css( {backgroundPosition: "right top"} ); //$(this).removeClass('submithover'); }); $('.submit').hover(function () { $(this).css( {backgroundPosition: "left bottom"} ); }, function() { $(this).css( {backgroundPosition: "left top"} ); //$(this).removeClass('submithover'); }); }}); Working code: $(function() { { $('.submit').hover(function () { $(this).css( {backgroundPosition: "left bottom"} ); }, function() { $(this).css( {backgroundPosition: "left top"} ); //$(this).removeClass('submithover'); }); }}); $('#test').bind('keyup', function() { if (url == 'devel') { $("#submit").addClass("submit-getinfo").removeClass("submit"); $('.submit-getinfo').hover(function () { $(this).css( {backgroundPosition: "right bottom"} ); }, function() { $(this).css( {backgroundPosition: "right top"} ); //$(this).removeClass('submithover'); }); } } ); I just fail to see why I have to put the hover statements in separate functions, instead of sticking both in the main DOM.

    Read the article

1