This work focuses on the consensus problem of multi-agent systems (MASs) under event-triggered control (ETC) subject to denial-of-service (DoS) jamming attacks. To reduce the cost of communication networks, a novel event-triggering mechanism (ETM) is applied to the sleeping interval to determine whether the sampled signal should be transmitted or not. Unlike periodic DoS attacks model, the DoS attacks occurrence are irregular, where attack attributes such as attack frequency and attack duration are taken into account. Moreover, compared with the fixed topological graph, the communication topologies may change due to DoS jamming attacks in this work. In view of this, based on the piecewise Lyapunov functional, sufficient conditions are derived to guarantee that consensus problem of the MASs can be solved. Finally, the effectiveness and correctness of the theoretical results are verified by a numerical example.