Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-19-2009, 02:10 PM #1
- Join Date
- Mar 2009
- Thanked 0 Times in 0 Posts
Can I use jQuery & PHP to display my project gallery?
I have a site http://www.maestro2007.co.il/index.php?mid=3 in which i display project thumbnails on the right, by clicking it, i want that project id to open it's project photos on the left without reloading/refreshing the page. (the data/photos comes from the database using php & mysql)
I was told I could use jQuery for that, but i have NO CLUE has how to do so.
Can anyone help/guide me on this one?
03-19-2009, 08:15 PM #2
- Join Date
- Feb 2009
- Wheeling, IL
- Thanked 62 Times in 60 Posts
Most of the time when I want to replace something with a PHP reply, I use jQuery and taconite (which is a plug-in for jQuery). What you'd need to stick inside your PHP code to do the replace is:
Pretty straightforward. Most of the time I stick a pre-generated variable in there, something like...PHP Code:
<replaceContent select=\"CSS Selector\">
Stuff to insert.
And well, the CSS Selector shouldn't be too hard to figure out too. Keep in mind that you need to have all tags closed and all characters that might not work well with XML fixed... otherwise it will do nothing.PHP Code:
$img = "<img src='img1.jpg' /><img src='img2.jpg' />"
The way to success is to assume that there are no impossible things. After all, if you think something is impossible, you will not even try to do it.
How to ask smart questions?