PHP - Moved: Change The Inputbox Content ( Hour ) Using The Keypress
This topic has been moved to JavaScript Help.
http://www.phpfreaks.com/forums/index.php?topic=319719.0 Similar TutorialsThis topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=332844.0 Currently, in my files, I echo content through either a function called error() or a funtion called info(). Each function has 3 require statements for the header, body and footer files and that is all that is contained in the function. What I want to do is, if error() is called, is kind of leave the script and exit it. Surprisingly I have used exit; at the end of the functions to stop any more of the script being executed. Is this the best way of doing it? Hello friends,
I am trying to achieve a simple thing, but I do not know jquery/javascript much. When I click on a forst list item in one div , I want to show corresponding 1st li in the second div. I have 6 list items in total and related 6 li in second div.
Also when I click on any list item in first div, it will be borderd, this I achieved. But I am not able to bring the related li in the second div.
Hope I make myself clear.
Here is my code
<style> .selected img { border:2px solid #090; } .visible { display:block; } .invisible { display:none; } </style> <div id="all"> <ul> <li class="selected"><img src="image1.JPG" /></li> <li><img src="image2.JPG" /><br /></li> <li><img src="image3.JPG" /><br /></li> </ul> </div> <div class="container"> <ul> <li class="visible"><img src="related_image1.JPG" /></li> (In these list items there may be img or content) <li class="invisible"><img src="related_image2.JPG" /></li> <li class="invisible"><img src="related_image3.JPG" /></li> </ul> </div> <script type="text/javascript"> $('#all ul li').on('click', function(){ $(this).addClass('selected').siblings().removeClass('selected'); $('.container ul li:nth-child(1)').fadeout(); // Don't know this line is correct or not }); </script>Any help guys ? Edited by Jaswinder, 19 July 2014 - 08:57 PM. Hi, I have some files stored in mysql db. I have created a web page which shows the list of tutorials from db. at first i was creating a separate php page for each tutorial, but later i have decided that it would be easier and simpler if i can create one php page and whenever i click the tutorials it will change the content of this page. example: when i click "tut002" from list. it will change the content of tutorials.php . I have these tutorials in .html format here is the code i have in turorials.php once again, whenever i click a tutorial this include part needs to change automatically to whatever i click Code: [Select] echo '<div class="content">'; include ("inc/tut001.html"); echo '</div>'; it will be really appreciated if you have a sample code for this. sorry for my english. thank to whoever interested in this matter. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=316053.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=351591.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=330989.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=319085.0 Stop posting non-PHP questions in the PHP Coding Help section. We have many sub-forums, including both a JavaScript forum and one dedicated entirely to Ajax. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=327454.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=346762.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342929.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342245.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=350095.0 This topic has been moved to Website Critique. http://www.phpfreaks.com/forums/index.php?topic=346717.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=357949.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319610.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=350544.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=305930.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347058.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=357414.0 |