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

  • SEARCH
  • Home
  • 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 7179697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:11:33+00:00 2026-05-28T17:11:33+00:00

i know this question has been asked here but i am stuck with this

  • 0

i know this question has been asked here but i am stuck with this problem and have already wasted a day so i thought making a new question might help with a quick response.. I am using full calendar in a web app, and i wanted to change the width of the events conditionally. For some i want the width halved and for some quartered. This is the solution proposed there

$('#calendar').fullCalendar({
    eventAfterRender: function(event, element, view) {
         $(element).css('width','50px');
      }
});

Now i how can i use this to halve the with that is already set? If i inspect an element i see that the absolut width is set but i think it is going to change depending on the screen size and calendar size, so can i somehow do something like width : width/2 so that it does not break on a resize. if its a very simple question, please bear with me as i am very new to web development.

  • 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-28T17:11:34+00:00Added an answer on May 28, 2026 at 5:11 pm

    Assign class names to the events that you want to resize.

    Then in the eventAfterRender method you can do something like this:

    eventAfterRender: function(event, element, view) {  
         var width = $(element).width();
    
         // Check which class the event has so you know whether it's half or quarter width
         if($(element).hasClass("HalfClass"))
            width = width / 2;
         if($(element).hasClass("QuarterClass"))
            width = width / 4;
    
         // Set the new width
         $(element).css('width', width + 'px');
      },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked many times on here but I have
I know that this question has already been asked HERE but sadly none of
I know this question has been asked before, but I ran into a problem.
I know this question has been asked here before, but I don't think those
I know this question has been asked here a few times before. But i
i know this has been asked here . But my question is slightly different.
I know that this question has been asked loads of times, but I have
Folks, I know this question has been asked before here, though indirectly . But
I know this question has been asked several times for sure, but I have
I know this question has been asked to death here, but I am unable

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.