Jump to content

Error in viewing the images


aneeb
 Share

Recommended Posts

Hey Everyone! i am writing a JavaScript code in which i am getting a JSON which prints the images names which are stored in the database, the code gets these images and puts them in a img tag.Now when i am running it it brings all of the images at once and error comes in the error console that it is not a function..The code is here

<script> // Then own code$(function() { // Shorthand for $(document).ready(function() {	$.getJSON('getphp.php', function(json) {		var images = '';		$.each(json.userdata, function(i, image) {			images = images + '<img src="images/' + image.a + '">';  		});		$('#slideShow').html(images).gallery({directionNavHide: false});	}); });</script>

Please help me i am new to this

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...