Jump to content

Error in viewing the images


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...