Restarting Counter-Reset

Developer
Size
2,331 Kb
Views
16,192

How do I make an restarting counter-reset?

I needed to restart the counter reset after having multiple OLs on a page. A quick jQuery function that handles that. May be cheating but I couldn't find a way to do it with only CSS. What is a restarting counter-reset? How do you make a restarting counter-reset? This script and codes were developed by Xavier Porter on 27 October 2022, Thursday.

Restarting Counter-Reset Previews

Restarting Counter-Reset - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Restarting Counter-Reset</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ol class="hunt"> <li>Number One</li> <li>Number Two</li> <li>Number Three</li>
</ol>
<ol class="hunt">
<li>Need for an IT alert or change notification is identified.</li>
<ul>
<li>This may occur after a pattern is recognized following several reported incidents. For Texas A&amp;M IT, a parent incident record is created.</li>
<li>Planned maintenance needs to be communicated to the university community.</li>
</ul>
<li>The outage form is submitted by an outage user or outage admin.</li>
<ul>
<li>Outage user: Open an outage from an incident (or problem) by right-clicking the grey header bar and selecting Create Outage.</li>
<ol>
<li>After submitting, user is returned to the incident (or problem) and a banner message appears with the following text, "Outage [Number] has been created successfully for [Task number]".</li>
<li>An email notification is sent to outage admins that a draft outage was submitted.</li>
</ol>
<li>Outage admin: Open an outage from an incident or navigate to Outages (Business Services &gt; Outages) and click New.</li>
<ol>
<li>After creating a new outage from the Outages module (without a Task number), a banner message with the following text, "Outage [Number] has been created successfully".</li>
</ol>
<li>ITIL user or roleless IT administrator: Email <a href="mailto:[email protected]">[email protected]</a> and it will automatically be assigned to the OC. Outage admin can submit the outage form on behalf of individuals without the outage user or outage admin role.</li>
</ul>
</ol>
<ol> <li>Number Ten</li> <li>Number Eleven</li> <li>Number Twelve</li>
</ol> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Restarting Counter-Reset - Script Codes CSS Codes

ol { list-style: none;	counter-reset: olfirst; /* our father OL must have olfirst item reseted */	font-family: arial;
}
ol > li { counter-increment: olfirst;
}
ol ul{ counter-reset:olsecond;
}
ol ul > li { counter-increment:olsecond;
}
ol ul li:before { content:counter(olsecond)' '
}
ol li:before {	content: counter(olfirst) ". "; /* let's output our pretty number */	}
Restarting Counter-Reset - Script Codes
Restarting Counter-Reset - Script Codes
Home Page Home
Developer Xavier Porter
Username xporter
Uploaded October 27, 2022
Rating 3
Size 2,331 Kb
Views 16,192
Do you need developer help for Restarting Counter-Reset?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Xavier Porter (xporter) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!