Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
¿Cómo aplicar colores para cada evento en el calendario completo js?

Quiero mostrar múltiples eventos con diferentes colores para cada uno. Aquí se han mostrado dos respuestas ajax en el calendario. Pero todos los eventos muestran solo verde. Los segundos eventos también visibles en color verde. ¿Cómo mostrar cada evento con diferentes colores?

Mi código es el siguiente:

 $('#calendar').fullCalendar({ events: function(start, end, timezone, callback) { $.ajax({ url: url1, dataType: 'json', success: function(response) { var events = []; $(response.data).each(function() { events.push({ title: $(this).attr('title'), start: $(this).attr('start'), // will be parsed color: 'green' }); }); callback(events); } }); $.ajax({ url: url2, dataType: 'json', success: function(response) { var events = []; $(response.data).each(function() { events.push({ title: $(this).attr('title'), start: $(this).attr('start'), // will be parsed color: 'red' }); }); callback(events); } }); } });
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!