EasyUI Forum
April 26, 2024, 03:46:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Panel Header Pulsation Animation Background  (Read 4715 times)
sky-t
Full Member
***
Posts: 145


View Profile
« on: August 02, 2020, 12:33:42 PM »

Hi there,

i want to add a class to panel header to make the header blinking like that

Code:
        .headerClsPulseRed {
            animation-name: backgroundcolor-pulsate;
            animation-duration: 2s;
            animation-iteration-count: infinite;
        }

after adding (and blinking header) i also want to remove the blinking header.


How can i achieve this??
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: August 03, 2020, 02:00:10 AM »

You can set the 'headerCls' property value to add custom class to the panel header.
Code:
$('#p').panel({
  headerCls: 'headerClsPulseRed'
})
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #2 on: August 04, 2020, 11:29:59 PM »

Hi jarry,

thank you for your answer.

When using your solution the header is pulsating - but the panel can't be moved anymore when set the headerCls.

Also i need to remove this pulsating class. When use

Code:
                window.top.$('#window_' + windowId).panel({
                    headerCls: ''
                });

the class is already there.


So what can we do to avoid this?


Thanks
« Last Edit: August 04, 2020, 11:53:14 PM by sky-t » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: August 05, 2020, 02:06:18 AM »

Retrieve the panel header first, and then add or remove class for it.
Code:
var h = $('#p').panel('header');
h.addClass('headerClsPulseRed');
h.removeClass('headerClsPulseRed');
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #4 on: August 05, 2020, 05:30:06 AM »

WOW jarry,


this works AWESOME!!!!


Thank you so much!!!!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!