Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'image gallery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. I've been trying to get this for a while (includes jQuery) and somehow nothing seems to work. The image gallery works fine but won't display title. $(document).ready(function() { var pics=[]; for (var x=0; x<preLoadPics.lenght;x++) { pics[x]=new Image(); pics[x].src=preLoadPics[x]; } var newPix=new Image(); newPix.src=preLoadPics[0]; $('#thumbPix a').click(function(evt){ evt.preventDefault(); var pixFile=$(this).attr('src'); var pixLink=$(this).attr('href'); var pixTitle=$(this).attr('title'); var oldPix=$('#pix img'); var newPix=$('<img src="'+pixLink+'">'); if(pixLink==oldPix.attr('src')){ return; }else{ $('.selected').removeClass('selected'); //add highlight to this thumbnail $(this).addClass('selected'); //make new image invisible newPix.show(); //add to the #pix div $('#pix').prepend(newPix); newPix.show(); //fade out old image and remove from DOM oldPix.fadeOut(0,function(){ $(this).remove(); }); //fade in new image newPix.fadeIn(0); oldPix.remove(pixFile,'^Lg+\w\.'); } }); //end click $('#thumbPix a:eq(0)').click(); }); //end ready </script> this is body section <div id="thumbPix"> <li><a href="LgPicture.jpg" id="pix"title="Picture"> <img src= "smallPicture.jpg" border="2" bordercolor="#cccc99"/>Picture<br /></a></li> One option that doesn't break it completely is adding pixTitle to the .prepend in the Javascript code. I got it to display title, but then it just builds the titles instead of replacing it. $('#pix').prepend(newPix,pixTitle); newPix.show(); any ideas? Thanks
×
×
  • Create New...