I am making a dropdown accordion. After adapting my code to the example bellow, everything works fine:
Example: https://codepen.io/CreativeBulma/pen/YbQqoQ
trainingData
[{
"von": "17:00",
"bis": "18:00",
"tag": "Mittwoch",
"trainingsid": 46
},
{
"von": "19:00",
"bis": "21:00",
"tag": "Donnerstag",
"trainingsid": 51
}]
That's how it works:
<div ref={collapsiblesRef} id={`accordion_first2`}>
<div className="card">
<header className="card-header">
<p className="card-header-title">
montaj
</p>
<a href={`#collapsible-card-0`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-0`} className="is-collapsible" data-parent={`accordion_first2`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
<div className="card">
<header className="card-header">
<p className="card-header-title">
dasdasd
</p>
<a href={`#collapsible-card-1`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-1`} className="is-collapsible" data-parent={`accordion_first2`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
</div>
Since I am having several elements I want to add to the dropdown, I am using a loop. But unfortunately, after adding the loop, the collapsibles aren't working properly - they are staying open and I cannot close them or interact with them.
So that's actually what I want:
<div ref={collapsiblesRef} id={`accordion_first`}>
{trainingData.map((d, i) => (
<div className="card" key={i}>
<header className="card-header">
<p className="card-header-title">
{d.tag}
</p>
<a href={`#collapsible-card-${i}`} data-action="collapse" className="card-header-icon is-hidden-fullscreen" aria-label="more options">
<span className="icon">
<i className="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div id={`collapsible-card-${i}`} className="is-collapsible" data-parent={`accordion_first`}>
<div className="card-content">
<p className="is-small has-text-primary has-text-weight-semibold">Tag</p>
</div>*/}
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Wochentag" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit von</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit von" />
<p className="is-small has-text-primary has-text-weight-semibold">Uhrzeit bis</p>
<input className="input mb-5" style={{ width: "33%" }} type="text" placeholder="Uhrzeit bis" />
<article className="message mt-3">
<div className="message-body">
Uhrzeit von ist die Startzeit und Uhrzeit bis ist die Endzeit des Trainings. Gültiges Format hh:mm, z.B. 17:45.
</div>
</article>
</div>
</div>
</div>
))}
</div>
I played a bit with the code, this works for me.
import React from "react";
import bulmaCollapsible from '#creativebulma/bulma-collapsible';
import 'bulma';
import '#creativebulma/bulma-collapsible';
///I want to generate a random number of collapsibles.
const array = [0,1,2,3,4,5,6]
class Collapsibles extends React.Component {
componentDidMount() {
this.collapsibles = bulmaCollapsible.attach(".is-collapsible", {
container: this.refs.collapsibles
});
}
render() {
const collapsibles = array.map((c,i) => <article className="message">
<div className="message-header">
<p>
Question 1{" "}
<a href={"#collapsible-message-accordion-"+ i.toString()} data-action="collapse">
Collapse/Expand
</a>
</p>
</div>
<div
id={"collapsible-message-accordion-"+ i.toString()}
className="message-body is-collapsible is-active"
data-parent="accordion_first"
>
<div className="message-body-content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{" "}
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut,
porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla.
Nullam gravida purus diam, et dictum
<a>felis venenatis</a> efficitur. Aenean ac{" "}
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi
magna a neque. Donec dui urna, vehicula et sem eget, facilisis
sodales sem.
</div>
</div>
</article>)
return (
<div ref="collapsibles" id="accordion_first">
{collapsibles}
</div>
)
}
}
export default Collapsibles
A few notes on the code:
First, I assume you're aware that bulmaCollapsible is an npm package that needs to be installed. You can find directions for installation here.
I didn't fully understand where you got your code from, I copied mine from the CodePen you provided. Each collapsible container is an article tag.
My code lacks any transition properties. So it won't slowly open and close. You'll have to add some minor css to make that happen.
The method attach is responsible to initialise any element with the className of is-collapsible. It was made so you can initialise multiple collapsibles at once.
In my code I created an array const called "array". Then I used the map method like you did to generate multiple collapsibles.
The following will give you 1 collapsible:
<article className="message">
<div className="message-header">
<p>
Question 1{" "}
<a href={"#collapsible-message-accordion-"+ i.toString()} data-action="collapse">
Collapse/Expand
</a>
</p>
</div>
<div
id={"collapsible-message-accordion-"+ i.toString()}
className="message-body is-collapsible is-active"
data-parent="accordion_first"
>
<div className="message-body-content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.{" "}
<strong>Pellentesque risus mi</strong>, tempus quis placerat ut,
porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla.
Nullam gravida purus diam, et dictum
<a>felis venenatis</a> efficitur. Aenean ac{" "}
<em>eleifend lacus</em>, in mollis lectus. Donec sodales, arcu et
sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi
magna a neque. Donec dui urna, vehicula et sem eget, facilisis
sodales sem.
</div>
</div>
Each collapsible needs to have a unique id. For each collapsible we use an a tag with an href attribute equal to the collapsible's id. This is reflected in the lines where you see href={"#collapsible-message-accordion-"+ i.toString()} and id={"#collapsible-message-accordion-"+ i.toString()}
To know more about how this package work, visit their JS API page.
Related
I'm building a slider with React and framer motion. My idea is to subtract scrollWidth with offsetWidth to get the remaining width of the element.
I always get the value of zero (somehow they are equal). I printed the object and I saw that scrollWidth value returns clientWidth instead.
In the object the value of scrollWidth is totaly different and I cant tell why.
I am Creating This Same Project Carousel Slider In Next.js
But I got scrollWidth is Undefined
I dont Know What Happend But..
I got scrollWidth is undefined
enter image description here
import React, { useEffect, useRef, useState } from 'react'
import { motion } from 'framer-motion';
import cardsUser from '../pages/CardsUsers'
const CardCaousel = () => {
const [width,setWidth] = useState(0)
const carousel = useRef()
useEffect(()=>{
setWidth(carousel.current.scrollWidth - carousel.current.offsetWidth)
},[])
return (
<div className="container max-w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-5 bggradient">
<div className="liveactionscontainer mt-20">
<h1 className='text-center text-white font-extralight text-6xl mt-2 mb-3'>Live Actions </h1>
<p className='font-extralight text-gray-500 text-center'>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Perspiciatis, suscipit repellat
<br/>
inventore dolor quia quos molestias quae vitae? Eveniet nobis, laborum voluptas culpa libero similique.</p>
<div className="myflex flex justify-center" data-aos="fade-right">
<motion.div className="carousel">
<motion.div
drag="X"
dragConstraints={{right:0,left:-width}}
className="inner-carousel"
>
{cardsUser.map((e)=>{
return (
<motion.div className='item' key={e}>
<div className="mycolumn mb-10">
<div class="nft">
<div class='main'>
<img class='tokenImage' src={e.Imgsrc} alt="NFT" />
<h2>{e.name}</h2>
<p class='description'>Lorem, ipsum dolor sit amet consectetur adipisicing elit. </p>
<div class='tokenInfo'>
<div class="price">
<ins>◘</ins>
<p>0.031 ETH</p>
</div>
<div class="duration">
<button>Place bid</button>
</div>
</div>
<hr />
<div class='creator'>
<div class='wrapper'>
<img src={e.profileImg} alt="Creator" />
</div>
<p><ins>Creation of</ins><span className='text-white'> NF</span> </p>
</div>
</div>
</div>
</div>
</motion.div>
);})}
</motion.div>
</motion.div>
</div>
</div>
</div>
)
}
export default CardCaousel
I'm creating a Blazor Server project with login and I want to check if the email and password that the user introduces exists in the database(I'm using Sql Server). I created my method that is searching in the database in a class named BatranService and my login form in a Razor component, but I'm not sure how the code to connect these two would look like. I would appreciate any help, thanks!
public class BatranService : IBatranService
{
private readonly VoluntariatDBContext _context;
public BatranService(VoluntariatDBContext context)
{
_context = context;
}
public async Task<Batran> GetBatranByEmailAndParola(string email, string parola)
{
Batran batran = await _context.Batrans.Where(c=>c.Parola==parola).FirstOrDefaultAsync(c => c.Email == email);
return batran;
}
}
<EditForm Model="#batran" OnValidSubmit="#authBatran">
<div class="container px-4 py-5 mx-auto">
<div class="card card0">
<div class="d-flex flex-lg-row flex-column-reverse">
<div class="card card1">
<div class="row justify-content-center my-auto">
<div class="col-md-8 col-10 my-5">
<div class="row justify-content-center px-3 mb-3"> <img id="logo" src="css/autentificareLogo.png"> </div>
<h3 class="mb-5 text-center heading">Autentificare</h3>
<div class="form-group"> <label class="form-control-label text-muted">Email</label> <input type="text" id="email" #bind-value="#batran.Email" name="email" placeholder="Email" class="form-control"> </div>
<div class="form-group"> <label class="form-control-label text-muted">Parola</label> <input type="password" id="parola" #bind-value="#batran.Parola" name="parola" placeholder="Parola" class="form-control"> </div>
<div class="row justify-content-center my-3 px-3"> <button #onclick="authBatran" class="btn-block btn-color">Intra in cont</button> </div>
<div class="row justify-content-center my-2"> <small class="text-muted">Ai uitat parola?</small> </div>
</div>
</div>
<div class="bottom text-center mb-5">
<p href="#" class="sm-text mx-auto mb-3">Nu ai un cont?<button #onclick="deschideInregistrare" class="btn btn-white ml-2">Inregistreaza-te acum!</button></p>
</div>
<div class="col-12 row" style="text-align:left; font-weight:bold">
<span class="col-12"></span>
</div>
</div>
<div class="card card2">
<div class="my-auto mx-md-5 px-md-5 right">
<h4 class="text-white">We are more than just a company</h4> <small class="text-white">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</small>
</div>
</div>
</div>
</div>
</div>
</EditForm>
#code{
private void authBatran()
{
}
}
<ClickAwayListener onClickAway={this.handleClose}>
<Navbar color="light" light expand="md" className="navbar-fixed-top">
<Container>
<Nav className="ml-auto" navbar>
<NavItem>
<NavLink href="#" id="link-menu-1" className="nav-link" onClick={this.handleLoans}>LOANS {this.state.LOANS ? <FontAwesomeIcon className="faChevronDown" icon={faChevronUp} /> : <FontAwesomeIcon className="faChevronDown" icon={faChevronDown} />} </NavLink>
</NavItem>
<NavItem>
<NavLink href="#" id="link-menu-2" className="nav-link" caret onClick={this.handleGovtSubsidy}>Govt. Subsidy {this.state.GovtSubsidy ? <FontAwesomeIcon className="faChevronDown" icon={faChevronUp} /> : <FontAwesomeIcon className="faChevronDown" icon={faChevronDown} />} </NavLink>
</NavItem>
<NavItem>
<NavLink href="#" id="link-menu-3" className="nav-link" caret onClick={this.handleGENINSURANCE}> GEN. INSURANCE {this.state.GENINSURANCE ? <FontAwesomeIcon className="faChevronDown" icon={faChevronUp} /> : <FontAwesomeIcon className="faChevronDown" icon={faChevronDown} />} </NavLink>
</NavItem>
<NavItem>
<NavLink href="#" id="link-menu-4" className="nav-link" caret onClick={this.handleLIFEINSURANCE}>LIFE INSURANCE {this.state.LIFEINSURANCE ? <FontAwesomeIcon className="faChevronDown" icon={faChevronUp} /> : <FontAwesomeIcon className="faChevronDown" icon={faChevronDown} />} </NavLink>
</NavItem>
<NavItem>
<NavLink href="#" id="link-menu-5" className="nav-link" caret onClick={this.handleELITESERVICES}>ELITE SERVICES {this.state.ELITESERVICES ? <FontAwesomeIcon className="faChevronDown" icon={faChevronUp} /> : <FontAwesomeIcon className="faChevronDown" icon={faChevronDown} />} </NavLink>
</NavItem>
</Nav>
</Container>
</Navbar>
</ClickAwayListener>
<div className="submenu-cover">
{this.state.LOANS ?
<div id="menu-1" className="header-submenu loan-submenu">
<PerfectScrollbar component="div" >
<Container fluid={true} >
<Row xs="4" >
<Col className="img-cover">
<img src={LoanMenu} />
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Retails Loans</div>
<ListGroup>
<ListGroupItem onClick={() => this.gotoPersonalLoanForm()}>Retail Home Loan</ListGroupItem>
<ListGroupItem>Retail LAP (Loan Against Property)</ListGroupItem>
<ListGroupItem>Retail LRD (Lease Rental Discounting)</ListGroupItem>
<ListGroupItem>Retail APF</ListGroupItem>
</ListGroup>
</div>
<div className="list-wrap">
<div className="list-title">INFRA Loans</div>
<ListGroup>
<ListGroupItem>Construction Finance</ListGroupItem>
<ListGroupItem>Infrastructure Finance</ListGroupItem>
</ListGroup>
</div>
</Col>
<Col>
<div className="list-wrap">
<div className="list-title">SME Loans</div>
<ListGroup>
<ListGroupItem><Link to='/BusinessLoanForm'>SME CC/OD</Link></ListGroupItem>
<ListGroupItem>SME Term Loan</ListGroupItem>
<ListGroupItem>SME Term Loan + CC/OD</ListGroupItem>
<ListGroupItem>SME NFB (Non Fund Base)</ListGroupItem>
<ListGroupItem>SME LAP (Loan Against Property)</ListGroupItem>
<ListGroupItem>SME CGTMSE</ListGroupItem>
</ListGroup>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Unsecured Loans</div>
<ListGroup>
<ListGroupItem>Business Loan</ListGroupItem>
<ListGroupItem>Personal Loan</ListGroupItem>
<ListGroupItem>School Fee Funding</ListGroupItem>
</ListGroup>
</div>
<div className="list-wrap">
<div className="list-title">Channel Finance</div>
<ListGroup>
<ListGroupItem>Anchor Lead Bill Discounting</ListGroupItem>
<ListGroupItem>Anchor Lead Input Finance</ListGroupItem>
<ListGroupItem>Vendor Lead Bill Discounting</ListGroupItem>
</ListGroup>
</div>
</Col>
</Row>
</Container>
</PerfectScrollbar>
</div>
: ''}
{this.state.GovtSubsidy ?
<div id="menu-2" className="header-submenu subsidy-submenu">
<PerfectScrollbar component="div" >
<Container fluid={true} >
<Row xs="4" >
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Interest Subsidy</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Central Govt. Subsidy</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Capital Subsidy</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Electric Subsidy</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">GST Subsidy</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Others</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col className="img-cover">
<img src={SubsidyMenu} />
</Col>
</Row>
</Container>
</PerfectScrollbar>
</div>
: ''}
{this.state.GENINSURANCE ?
<div id="menu-3" className="header-submenu geninsurance-submenu">
<PerfectScrollbar component="div" >
<Container fluid={true} >
<Row xs="4" >
<Col className="img-cover">
<img src={GenInsuranceMenu} />
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Aviation Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Credit Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Agriculture Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Motor Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Engineering Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Fire Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Health Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Liability Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Marine Cargo</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
<div className="list-wrap">
<div className="list-title">Miscellaneous Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
</Row>
</Container>
</PerfectScrollbar>
</div>
: ''}
{this.state.LIFEINSURANCE ?
<div id="menu-4" className="header-submenu lifeinsurance-submenu">
<PerfectScrollbar component="div" >
<Container fluid={true} >
<Row xs="4" >
<Col>
<div className="list-wrap">
<div className="list-title">Term Plan Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap">
<div className="list-title">Traditional Plan Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col>
<div className="list-wrap">
<div className="list-title">ULIP Plan Insurance</div>
<div className="list-text">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
<Col className="img-cover">
<img src={LifeInsuranceMenu} />
</Col>
</Row>
</Container>
</PerfectScrollbar>
</div>
: ''}
{this.state.ELITESERVICES ?
<div id="menu-5" className="header-submenu eliteservices-submenu">
<PerfectScrollbar component="div" >
<Container fluid={true} >
<Row xs="4" >
<Col className="img-cover">
<img src={EliteServicesMenu} />
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Business Valuations</div>
<ListGroup>
<ListGroupItem>Business Takeover</ListGroupItem>
<ListGroupItem>Purchase Valuation</ListGroupItem>
<ListGroupItem>New Share Issue valuation </ListGroupItem>
<ListGroupItem>Business Synergy Valuation </ListGroupItem>
</ListGroup>
</div>
<div className="list-wrap">
<div className="list-title">Strategic Financial Advisor</div>
<ListGroup>
<ListGroupItem>Company profile preparation</ListGroupItem>
<ListGroupItem>Outsourced CFO Service</ListGroupItem>
<ListGroupItem>Project Report</ListGroupItem>
<ListGroupItem>Financial Projections</ListGroupItem>
</ListGroup>
</div>
</Col>
<Col>
<div className="list-wrap">
<div className="list-title">Compliance Services</div>
<ListGroup>
<ListGroupItem>COP certificate</ListGroupItem>
<ListGroupItem>MOF certificate</ListGroupItem>
<ListGroupItem>Funds Utilisation Certificate</ListGroupItem>
<ListGroupItem>DCCO Certificate </ListGroupItem>
<ListGroupItem>Net Worth Certificate </ListGroupItem>
<ListGroupItem>Statutory Compliance Certificate </ListGroupItem>
<ListGroupItem>Certificate for Subsidy</ListGroupItem>
<ListGroupItem>Stock Statement </ListGroupItem>
</ListGroup>
</div>
</Col>
<Col>
<div className="list-wrap list-wrap-mb">
<div className="list-title">Equity Fund Raise</div>
<ListGroup>
<ListGroupItem>Angle Fund Raise</ListGroupItem>
<ListGroupItem>Seed Fund Raise</ListGroupItem>
<ListGroupItem>VC Fund Raise </ListGroupItem>
<ListGroupItem>PE Fund Raise</ListGroupItem>
</ListGroup>
</div>
<div className="list-wrap">
<div className="list-title">Merger & Acquisition</div>
<div className="list-text set-max">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
</div>
<div className="know-more">Know More</div>
</div>
</Col>
</Row>
</Container>
</PerfectScrollbar>
</div>
: ""}
</div>
this is my code and I have already applied the ClickAwayListener but it's not working and I'm not able to solve this error because I'm unable to understand the bug debugger I have applied in so many ways but still couldn't get any success. Thank you so much in advance for helping me.
In this code, the listing of the header menu is in Navbar and when we click on a particular header menu the submenu of that menu will open.
And when I click away from that menu the submenu section will be closed.
just because of a lack of experience in Reactjs I'm unable to solve it.
It'll be great for me if anyone can give me the solution to this.
On my WordPress website in front page there is a latest post list and the structure described below. The first div contains class music-info contains 3 post with the same structure but the class added after that to <div class="music-info two"> how to make this possible in wordpress post outside the post loop
<div class="music-info">
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m1.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m2.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m3.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="clearfix"></div>
</div>
<div class="music-info two">
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m4.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m6.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<img src="images/m5.jpg" alt=""/>
<figcaption>
<h4>MUSIC ALBUM</h4>
<p>In sit amet sapien eros Integer in tincidunt labore et dolore magna aliqua</p>
</figcaption>
</figure>
</div>
<div class="clearfix"></div>
</div>
PHP code
<?php
$args = array(
'post_type'=>'product',
'posts_per_page'=>'3'
);
$query = new WP_Query($args);
/*echo"<pre>";
print_r($query);
die();*/
?>
<div class='music-info'>
<?php
if($query->have_posts()): while($query->have_posts()): $query->the_post();
?>
<div class="col-md-4 music-grids">
<figure class="effect-bubba">
<?php
if(has_post_thumbnail())
{
the_post_thumbnail();
}
?>
<figcaption>
<h4><?php the_title(); ?></h4>
<?php the_excerpt(); ?>
</figcaption>
</figure>
</div>
<?php wp_reset_postdata(); ?>
<?php endwhile; endif; ?>
<div class="clearfix"></div>
</div>
</div>
</div>
Im working on an app that uses MVC and angular for routing. Everything works fine. I'm having problem using Bootstrap for the looks inside my ng-view. I have a _Layout.cshtml (base file for layout).
<div class="container body-content">
#RenderBody()
<hr />
<footer>
<p>© #DateTime.Now.Year</p>
</footer>
</div>
<script src="~/js/plugins/jquery/jquery.min.js"></script>
<script src="~/js/plugins/jquery/jquery-ui.min.js"></script>
<script src="~/js/plugins/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="~/js/plugins/bootstrap/bootstrap-datepicker.js"></script>
This is a just a part of the code.
Under views i have a Home Page as follows
<div data-ng-non-bindable>
<div id="home" data-ng-controller="rootViewModel">
<div ng-view >
</div>
</div>
and final i have a view
<div class="page-content-wrap">
<div class="row">
<div class="col-md-12">
<!-- START DEFAULT WIZARD -->
<!-- START WIZARD WITH SUBMIT BUTTON -->
<div class="block">
<h4>Register organization</h4>
<form action="javascript:alert('Submited!');" role="form" class="form-horizontal">
<div class="wizard show-submit">
<ul>
<li>
<a href="#step-5">
<span class="stepNumber">1</span>
<span class="stepDesc">User<br /><small>Personal data</small></span>
</a>
</li>
<li>
<a href="#step-6">
<span class="stepNumber">2</span>
<span class="stepDesc">Contact<br /><small>Information</small></span>
</a>
</li>
</ul>
<div id="step-5">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong>One Column</strong> Layout</h3>
<ul class="panel-controls">
<li><span class="fa fa-times"></span></li>
</ul>
</div>
<div class="panel-body">
<p>This is non libero bibendum, scelerisque arcu id, placerat nunc. Integer ullamcorper rutrum dui eget porta. Fusce enim dui, pulvinar a augue nec, dapibus hendrerit mauris. Praesent efficitur, elit non convallis faucibus, enim sapien suscipit mi, sit amet fringilla felis arcu id sem. Phasellus semper felis in odio convallis, et venenatis nisl posuere. Morbi non aliquet magna, a consectetur risus. Vivamus quis tellus eros. Nulla sagittis nisi sit amet orci consectetur laoreet. Vivamus volutpat erat ac vulputate laoreet. Phasellus eu ipsum massa.</p>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Organization name</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" class="form-control" data-ng-model="organization.TenantName"/>
</div>
<span class="help-block">The name should be unique, the name should identify your organization</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Phone number</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon" ><span class="fa fa-phone"></span></span>
<input type="text" data-ng-model="organization.PhoneNumber" class="form-control" />
</div>
<span class="help-block">Cell number for primary communication</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Email</label>
<div class="col-md-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-envelope"></span></span>
<input data-ng-model="organization.Email" type="text" class="form-control" />
</div>
<span class="help-block">Valid email address</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Description</label>
<div class="col-md-6 col-xs-12">
<textarea data-ng-model="organization.Description" class="form-control" rows="5"></textarea>
<span class="help-block">Briefly describe your organization</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Logo</label>
<div class="col-md-6 col-xs-12">
<input data-ng-model="organization.Logo" type="file" class="fileinput btn-primary" name="filename" id="filename" title="Browse file" />
<span class="help-block">Input type file</span>
</div>
</div>
<div class="form-group">
<label class="col-md-3 col-xs-12 control-label">Visibility</label>
<div class="col-md-6 col-xs-12">
<label class="check"><input id="toggle-one" data-ng-model="organization.IsPublic" ng-checked="organization.IsPublic" type="checkbox" class="icheckbox" checked="checked" /> Checkbox title</label>
<span class="help-block">To be visible to every one online check this box</span>
</div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-default">Clear Form</button>
<button class="btn btn-primary pull-right">Submit</button>
</div>
</div>
</div>
<div id="step-6">
<!--Select license data-->
</div>
</div>
</form>
</div>
<!-- END WIZARD WITH SUBMIT BUTTON -->
</div>
</div>
this view does not load datepicker bootstrap referenced in the layout, but css and angular controllers works fine. but when i remove the view and put it direct to my homepage.cshtml it works fine. the problem is the ng-view. any help will be appreciated. thanks