In CKEditor 4, the buttons on the toolbar are made up of various plugins, located in its /plugins/ folder. In our case, I needed to add a custom button that, when viewing the source, would look as such: <p class=”h2″>H2 Heading</p> It’s a bit of a strange use-case, but it’s for a website in which …
Posts Tagged: jQuery
Counting with CSS using CSS Counters
body { counter-reset: count; } li a:before { counter-increment: count; content: counter(count) “. “; font-weight: bold; } I needed to use something like this to count the <LI>s within an unordered list <UL> for a table of contents generated using jQuery. It’s simple, so there’s not too much to explain about it. It’s super handy …
Use Headings Throughout Your Oxwall Installation Using jQuery
Using Oxwall with plugins such as the forum and third-party articles plugin, you may have noticed that you’re not allowed to enter certain HTML. Well, you can, but it gets stripped once you’ve submitted the form. Instead of digging through core files that will be overwritten after upgrades and patches, we can use some jQuery …
Styling an IFrame With jQuery and CSS
<script> $(‘iframe’).load( function() { $(‘iframe’).contents().find(“head”) .append($(“<style type=’text/css’> .yourCSS{background:#eee} </style>”)); }); </script> That’s pretty much it. Add the script where it needs to load. As an example, I used this to style the quoting feature within a textarea: I believe there’s only very hacky ways of doing this if the IFrame isn’t coming from your own website. In …
A Quick jQuery Solution For a Fixed Website Menu
With Beard Profile, we decided to make the website’s header fixed. This should fix issues with long-scrolling article content, and most definitely the Newsfeed content. We initially had a Back to Top button, but a fixed menu seems to be a better option when it comes to keeping visitors navigating on your website. This is …
Using Google’s CDN to Load jQuery, With a Local Fallback, on Your WordPress-Powered Site
Here’s an easy way to enqueue jQuery using Google’s Hosted Libraries with a local fallback. One of the great benefits of using a content delivery network to serve files is faster loading times for your visitors. In your theme’s functions.php, go ahead and add this: // jQuery from Google’s CDN, fallback to local if not …