I have a page with three rows of main information that all have a 'More Info' button attached, sort of like http://www.wefollow.com and their info button.
When the 'More Info' link is clicked a <tr> with a class of "mi" slides down above the main info.
The problem that I am getting is hiding the <tr> before the 'More Info' link is clicked. There is just a blank space where the <tr> is. The info in the <tr> is being hidden with jQuery (script below) and then displays when 'More Info' is clicked.
I tried hiding the "mi" with CSS but when the 'More Info' button is clicked, nothing happens.
I see two problems in the markup. First, IDs must be unique. That means no two elements can have the same ID. And the second is that IDs cannot begin with a number. They must begin with a letter or underscore.
I see two problems in the markup. First, IDs must be unique. That means no two elements can have the same ID. And the second is that IDs cannot begin with a number. They must begin with a letter or underscore.
Alright, I changed all id's to something unique and none are starting with numbers but it is still not working properly.
The files are on the localhost so I will post the files here.
main file(function is called in the html page in an 'output-listings' div)
buy.function.php:
PHP Code:
<?php
function outputListingsTable()
{
$mysql = new mysqli('localhost', 'root', 'root', 'ajax_demo') or die('you\'re dead');
$result = $mysql->query("SELECT * FROM explore") or die($mysql->error);
The PHP code doesn't do us any good because this issue is at the front-end. Can you view your page, then view the source and paste that source here in a code block?
Alright, I cleaned it up a bit and validated it and fixed some errors. The only error now is the duplicated 'curve-container' div which isn't really a problem right now, its just for styling purposes.
Can you check that your getinfo.php is actually returning content?
Yup it is, the three site descriptions in the database.
Heres the page source:
Code:
<span class="description">Leftlane News is a leading source for automotive industry and vehicle news. Read by driving enthusiasts, car shoppers, autoworkers, executives, and investors, it is updated throughout the day with the very latest auto news as it happens. No other site brings together the same degree of timeliness, thoroughness and accuracy as Leftlane News.</span>
<span class="description">Motor Authority is a global news source specializing in automotive industry, product and motorsport news with a skew towards high-performance and luxury segments. Motor Authority is always at the forefront of cutting edge and breaking news and provides 24-hour coverage of all the events and happenings in the automotive world.</span>
<span class="description">Autoblog.com is a web site that offers daily weblogs and podcast news and commentary about automobiles and the automotive industry. It is part of the Weblogs, Inc. network of media sites which is owned by AOL.</span>
Bookmarks