Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6216579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:16:24+00:00 2026-05-24T07:16:24+00:00

I am currently developing a calendar system with the Codeigniter framework. I want a

  • 0

I am currently developing a calendar system with the Codeigniter framework. I want a div to be shown each time a day cell in the calendar template is clicked.

The divs are created by a php for loop and populated from the database in the following view file:

calendar_view.php

    <div class="cal_container">

<?php echo $calendar; ?>

<div class="day_expanded_container">

<?php for ($i = 1; $i<=31; $i++):?>

    <div class="day_expanded" id"<?php echo 'd'.$i;?>">

    <?php if (isset($calendar_info[$i])):?>


        <h2><?php echo $calendar_info[$i]['title'];?></h2>

        <p><?php echo $calendar_info[$i]['text']?></p>

    <?php else: ?>

        <h2>No Data for this Date</h2>

        <p>There is currently nothing planned for this Calendar date.</p>

    <?php endif; ?>

    </div>

<?php endfor;?>

</div>

</div>

The following jQuery is then applied:

scripts.js

$(document).ready(function(){

    var divs = $('div.day_expanded_container > div').get();

    var today = $(".today").attr("id");

    $(divs).hide().filter('#d' + today).show();

    $(".day").click(function() {

        var selected = $(this).attr("id");


        $(divs).hide().filter('#d' + selected).show();


    });

});

However on loading the page the divs are all hidden, and clicking does not show at all.

All id’s etc are correct and I can’t find anything in the css that will over-ride. Is there something glaringly obvious that I am doing wrong ?

Thanks very much

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:16:25+00:00Added an answer on May 24, 2026 at 7:16 am

    You are missing an equals sign:

    id"<?php echo 'd'.$i;?>"
    

    should be

    id="<?php echo 'd'.$i;?>"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a calendar with all standard views (day, week, month). To load
Currently developing a PHP framework and have ran into my first problem. I need
Im currently developing a system where the user will end up having large arrays(
I'm currently developing an application in which I'm using a plugin system. For providing
I'm currently developing an ASP.NET Human Resources System. I'm using a layered architecture with
I'm developing a system that often use the system time because the Delayed interface.
Im currently developing a framework for oAuth 1 and 2 access to webservices and
I'm currently developing a small customer relationship and invoice management system for my client.
I am currently developing an events calendar application using ASP.NET MVC and SQL Server
I currently developing an hotel web site and they use the iHotelier system. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.