Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    altering this simple targeted div link script

    Good Day folks, yes Iam coding over the holidays

    I have this nice simple script and I hope to alter it
    so it will target 2 separate divs with 2 different html pages

    Code:
     
    	<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
    	<script type="text/javascript">
    	$(function(){
    		$('#index a').click(function(e) { 
    			  $('#wordlist').hide().load( $(this).attr('href') , function(){
    					 $('#wordlist').show()
    			  })
    			  return false
    		})
    	})
    	</script>
    	<style type="text/css">
    
    	</style>
    is it possible to do this in 1 function, or place a 2nd function, or simply duplicate the entire script,

    this time around the link will be in the wordlist div targeting 2 divs content 1 & content 2

    I wish I had more exp in this, I think it should rather simple for the more exp amongst you

    thx
    Les
    Last edited by vinyl-junkie; 12-16-2013 at 04:42 AM. Reason: Corrected code tags

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,091
    Thanks
    23
    Thanked 593 Times in 592 Posts
    This can be imported(include) to each page and used.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

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