Search Results

Search found 6 results on 1 pages for 'zuk1'.

Page 1/1 | 1 

  • jQuery Rollovers Not Preloading

    - by zuk1
    $('.ro').hover( function(){ t = $(this); t.attr('src',t.attr('src').replace(/([^.]*)\.(.*)/, "$1_o.$2")); }, function(){ t = $(this); t.attr('src',t.attr('src').replace('_o','')); } ); I use this code so that (for examle) test.gif with the class 'ro' would change to test_o.gif on rollover, the problem is when the images aren't in the cache there is lag on rollover and rolloff. Basically if I clear my cache and visit the test page, everytime I rollover and rolloff the image it is loading the file each time, so you could sit there for hours and it would still be loading the rollover images each time. However, when I refresh the page and the images are now in the cache it works instantly, which is what I need to achieve. I've tried using this http://flesler.blogspot.com/2008/01/jquerypreload.html plugin to preload the images with this $.preload('.ro'); code, but it seems to have no effect. Any ideas?

    Read the article

  • jQuery Swapping Elements

    - by zuk1
    Ok let me make an example: <head> <script type="text/javascript"> $(document).ready(function(){ $("#options_2").hide(); $("#options_3").hide(); }); </script> </head> <body> <div id="options_1">option 1</div> <div id="options_2">option 2</div> <div id="options_3">option 3</div> <a href="" class="selected">choose option 1</a> <a href="">choose option 2</a> <a href="">choose option 3</a> </body> As you can see only option 1 is visible by default, and the link you click to show option 1 has the class="selected" by default, showing the user that that option is currently selected. I basically want it so that when they click "choose option 2" the options 1 div hides itself and the options 2 div shows itself, and then gives the second link the selected class and removes the class from the image link. It basically just tabs using links and divs but due to the format I have to display it in I cannot use any of the tabs plugins I have found online.

    Read the article

  • PHP Detect if any URL variables have been set

    - by zuk1
    Hey guys, it's kind of hard to explain but basically I want to detect if any variables have been set through the URL. So with my IF statement all of the following should return true: http://domain.com/index.php?m=100 http://domain.com/index.php?q=harhar http://domain.com/index.php?variable=poo&crazy=yes and all the following return false: http://domain.com/index.php http://domain.com/test.php http://domain.com/no_variables.php Any ideas?

    Read the article

  • Parsing Domain From URL In PHP

    - by zuk1
    I need to build a function which parses the domain from a url. So: http://google.com/dhasjkdas/sadsdds/sdda/sdads.html or http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html Would become "google.com" and http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html would become "google.co.uk"

    Read the article

  • PHP Case Insensitive Word Replacement

    - by zuk1
    Ok I'm trying to make search terms bold in this search script I'm making, except I can't get it to work case insensitive. function highlight($term,$target){ $terms = explode(" ", $term); foreach($terms as $term){ $result = (eregi_replace($term, "<strong>$term</strong>", $target)); } return $result; } That is the function I have so far.. It says on PHP.net that eregi_replace is case insensitive matching but it's obviously not working for some reason. (I'm a noob). Any ideas? :D

    Read the article

1