Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am trying to open the menu items on clicking on click here link.
My fiddle link is as below link
link is here
This link should work like toggle on clicking. Please help with this enter code here
You can't use two or multiple ID(s) on one html element(tag)..why you can not do this read on this link
so finally your code:
<div class="cart_clas" >
<div id="showAll">
Click here
</div>
<!-- menu !-->
<div class="filter-panel1" id="menu_rewards" style="display:none; ">
<div class="row" style="float:right;">
<div class="Shop_by">Shop by Categories</div>
<div class="hotel_menu">Deals & Offers</div>
<div class="hotel_menu">Mobile, Tablets & Accessories</div>
<div class="hotel_menu">Laptops & Peripherals</div>
<div class="hotel_menu">Men Fashion</div>
<div class="hotel_menu">Women Fashion</div>
<div class="hotel_menu">Home Decor & Kitchen</div>
<div class="hotel_menu">Personal & Health Devices</div>
<div class="hotel_menu">Home And Kitchen Appliances</div>
<div class="hotel_menu">Tv & Entertainment Devices</div>
<div class="hotel_menu">Camera, Dslrs & Accessories</div>
<div class="hotel_menu">Coupons & Discounts</div>
<div class="hotel_menu">Baby & Kids</div>
<div class="hotel_menu">Beauty & Health</div>
<div class="hotel_menu">Stationery & Office Supplies</div>
<div class="hotel_menu">Sports & Fitness</div>
<div class="hotel_menu">Car & Bike Accessories</div>
<div class="hotel_menu">Gifts & Hobbies </div>
</div>
</div>
<!-- menu !-->
</div>
and Jquery:
$(function() {
$('#showAll').click(function(){ //Adds click event listener
$('#menu_rewards').show(); // Toggles visibility.
});
});
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am creating a blog page. I want to create a small highlights section on the home page.
I created the highlight part from the admin panel, when I make changes, it appears from the database, but I cannot pull the information on the front side. Only the name of the blog will appear in the highlights. Where is the problem?
<div class="card text-center my-5">
<div class="card-header baslik-blog">
En Çok Okunan Blog Yazıları
</div>
<ul class="list-group list-group-flush">
<?php
$blogsor=$db->prepare("SELECT * FROM blog where blog_onecikar=:blog_onecikar");
$blogsor->execute(array(
'blog_onecikar' =>1,
));
while($blogcek=$blogsor->fetch(PDO::FETCH_ASSOC)){
?>
<a href="blog-page" class="blog-a">
<li class="list-group-item"><i class="fas fa-angle-double-right float-start"></i>
<?php $blogcek['blog_ad'] ?>
</li>
</a>
<?php } ?>
Tüm Blog Yazıları
</ul>
</div>
change
<?php $blogcek['blog_ad'] ?>
to
<?php echo $blogcek['blog_ad'] ?>
how to give link one page to another page vertical tab using bootstrap.
External link page:
<div class="tt-service-info"><a class="tt-service-title c-h5" href="http://jsrgraphics.com/our-products#finishing">FINISHING EQUIPMENT</a></div>
Destination page:
<li class="tt-nav-tab-item">FINISHING EQUIPMENT</li>
Tab content:
<div class="tab-content">
<div class="tab-pane text-style active" id="finishing">
<h3 class="uppercase yes_border">1 Color Machine </h3>
<p>
<?php echo do_shortcode('[featured_product_categories cats="220" per_cat="6" columns="4"]') ?>
</p>
</div>
Note: I want open particular tab, please help out here
When see more button is clicked, second passage shows but there is a gap in between them as per shown in the screenshot. I want the second passages to continue with first one
function ClickParent(ClickElem,ElemFind)
{
$("."+ClickElem).click(function() {
var GetGrp = $(this).parents(".group");
GetGrp.find("."+ElemFind).fadeToggle();
});
}
// Find one level
ClickParent('name','moreinfo');
// Find another level
ClickParent('moreinfo','evenmore');
<div class="group">
How are you?
<div class="moreinfo" style="display: none;">
Fine
</div>
<div class="evenmore" style="display: none;">
Even more stuff.
</div>
</div>
How to get result from How are you?? Fine answer should be next to the question with no space.
I get now what you want for your project. You wanted a "Read more" function for your articles.
Using <div></div> to hide your continued text/string causes a new line. You can just replace it with <font></font>.
<!-- FIRST ARTICLE -->
<div class="group">
This is the first article that would
<font class="evenmore" style="display: none;">
show more information about this first article.
</font>
<div class="moreinfo">
See more
</div>
</div>
<!-- SECOND ARTICLE -->
<div class="group">
This is the second article that would
<font class="evenmore" style="display: none;">
show more information about this second article.
</font>
<div class="moreinfo">
See more
</div>
</div>
Then let us create a script that when "See more" is clicked, it will hide this "See more" and would show the content inside <font></font>.
$(document).ready(function(){
$(".moreinfo").click(function(){ /* WHEN SEE MORE IS CLICKED */
var elem = $(this);
$(this).fadeOut(200).hide(); /* HIDE THE CLICKED SEE MORE */
elem.closest("div.group").find('font.evenmore').fadeIn(200).show(); /* SHOW THE CONTENT OF THE CLOSEST FONT */
});
});
Here is a fiddle. But if you want to hide the shown details, we can add a "Show Less". Check this second fiddle.
Using dom I want to get content from some specific div.
My Current situation is this : I want to get content from site link whose html structure is as below. I want that css class data for my local database. I think this is possible only using dom.
Here is the code :
<div class="listing-info-right ">
<div class="list-card-field name-address">
<div class="list-card-user">
Mr Bimal Kumar Agarwal
</div>
</div>
<div class="list-card-field name-address">
<div class="list-card-phone">
+91-9386750700,+91-612-2530310,+91-612-2530311
</div>
</div>
<div class="list-card-field name-address">
<div class="list-card-email">enquiry#elementguestline.com</div></div>
<div class="list-card-field name-address list-card-border">
<div class="list-card-location">28,, Nalini Aparment 4th Floor, Kidwaipuri, Fraser Road, Patna, 800001, Bihar</div>
</div>
</div>
I want to fetch data of div class named : list-card-user, list-card-phone and list-card-location.
Before I had done coding using dom with css id, but could not get anything with class name..!
Please help me with some code.
Thanks in Advance.
You can select your div with document.getElementsByClassName in Javascript. This will return an array of all the elements with that class, if you only have one occurence then simply get the first node.
var div = document.getElementsByClassName("list-card-user")[0];
The div variable now points to your div, you can use a bunch of functions on it to get different things. For example, if you want its content, you can do this :
var content = div.innerHtml;
Edit I used Javascript because your original question used the Javascript tag, which has been removed now with an edit.
This is the simple one, perhaps this helps you :)
<div class="listing-info-right ">
<div class="list-card-field name-address">
<div class="list-card-user">Mr Bimal Kumar Agarwal</div>
</div>
<div class="list-card-field name-address">
<div class="list-card-phone">+91-9386750700,+91-612-2530310,+91-612-2530311</div>
</div>
<div class="list-card-field name-address">
<div class="list-card-email">enquiry#elementguestline.com</div>
</div>
<div class="list-card-field name-address list-card-border">
<div class="list-card-location">28,, Nalini Aparment 4th Floor, Kidwaipuri, Fraser Road, Patna, 800001, Bihar</div>
</div>
</div>
Output:
<div id="myNamez"></div>
<div id="myPhonez"></div>
<div id="myLoc"></div>
Using jQuery:
<script>
$(document).ready(function () {
var namez='list-card-user';
var phonez='list-card-phone';
var locationz='list-card-location';
document.getElementById('myNamez').innerHTML='namez';
document.getElementById('myPhonez').innerHTML='phonez';
document.getElementById('myLoc').innerHTML='locationz';
});
</script>
Here's the demo
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
All of this needs to be inside my loop so I don't know if I can break it (don't think I can) but I need PHP to read it as HTML.
$movieDetails =
<header class="masthead" role="banner">
<div class="logo-container">
<a class="logo" href="">Movie Details</a>
</div>
</header>
<div class="bubble-container">
<div class="speech-bubble speech-bubble-top">
Text that goes into the bubble
</div>
</div>
You can just close your PHP tag to render text that will display as HTML.
<?php
foreach($movies as $movie) {
?>
<div>
<?php echo htmlspecialchars($movie); ?>
</div>
<?php
}
?>
$movieDetails = <<<HTML
<header class="masthead" role="banner">
<div class="logo-container">
<a class="logo" href="">Movie Details</a>
</div>
</header>
<div class="bubble-container">
<div class="speech-bubble speech-bubble-top">
Text that goes into the bubble
</div>
</div>
HTML;
echo $movieDetails;
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc