Results 1 to 3 of 3

Thread: jQuery!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Heminei's Avatar
    Join Date: May:2007
    Location:
    Posts: 25

    jQuery!

    Code:
    <script>
       $(function(){
          $('.music_link').mouseenter(function() {
             var divid = $(this).attr('val');
             $.get('ajax.php?func=test', { id: divid } , function(data){
                $('.music_link').mousemove(function(e){
                   var pageCoords = '( ' + e.pageX + ', ' + e.pageY + ' )';
                   var p = $('.music_link').position();
                   var space = 0;
                   var top=e.pageY;
                   var left=e.pageX+10;
                   $('#status').show().html('<div class=\'popup\' style=\'top: '+top+'px; left: '+left+'px;\'>'+data+'</div>');         
    
                });   
             });
          }).mouseleave(function() {
             $('#status').hide().html('');
          });
       });
       </script>
    ! : . 1 , . : id, ( ).

  2. #2
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    , . .mouse_link, . , . , $('.music_link').mousemove(). . p space , ...
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  3. #3
    Registered User Heminei's Avatar
    Join Date: May:2007
    Location:
    Posts: 25
    Code:
    <script>
    	$(function(){
    		
    		
    		$('.music_link').mouseenter(function(e) {
    			var top=e.pageY+15;
    			var left=e.pageX+15;
    			$('#status').fadeIn('fast').html('<div class=\'popup\' style=\'top: '+top+'px; left: '+left+'px;\'><center><img src=\'image/loading.gif\'></center></div>');
    			var divid = $(this).attr('val');
    			$.get('ajax.php?func=test', { id: divid } , function(data){
    					$('#status').fadeIn('fast').html('<div class=\'popup\' style=\'top: '+top+'px; left: '+left+'px;\'>'+data+'</div>');		
    			});
    		}).mouseleave(function() {
    			$('#status').fadeOut('fast');
    		});
    		
    	});
    
    	</script>

    ! -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |