Title overlaid filterable portfolio showcase

I am currently working on developing a filterable portfolio that features a colored overlay showcasing the project title similar to this example:

Example of Overlay: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_image_overlay_fade

However, I have encountered an issue where the filter does not seem to function properly when attempting to implement it into my portfolio code.

Portfolio Code: https://codepen.io/ford1234/pen/xLPELL

<div class="toolbar mb2 mt2">
<button class="pbtn fil-cat" href="" data-rel="all">All</button>
<button class="pbtn fil-cat" data-rel="live">Live</button>
<button class="pbtn fil-cat" data-rel="projects">Projects</button>
<button class="pbtn fil-cat" data-rel="events">Events</button>
</div> 

<div style="clear:both;"></div> 
<div id="portfolio">
<div class="tile scale-anm live all">
<img src="https://dev.dcrc.org.uk/wp-content/uploads/2017/08/autonomy-and-
automation.jpg" alt="">
</div>
<div class="tile scale-anm projects all">
<a href="#"><img src="http://dev.dcrc.org.uk/wp-content/uploads/2017/08/diy-
citizenship-crop.jpg" alt="" /></a>
</div>
<div class="tile scale-anm events all">
<a href="#"><img src="http://dev.dcrc.org.uk/wp-
content/uploads/2017/08/pervasive-media-cookbook-2.jpg" alt="" /></a>
 </div>
 <div class="tile scale-anm live all">
 <a href="#"><img src="http://dev.dcrc.org.uk/wp-
content/uploads/2017/08/amb-lit.jpg" alt="" /></a>
 </div>
 </div>

<div style="clear:both;"></div>

I appreciate any assistance as I am struggling to resolve this issue!

Answer №1

If you're encountering issues with your code and jQuery, it could be due to jQuery not being included or not being included correctly. Once jQuery is properly included, everything should work as expected.

In CodePen, you can easily add jQuery by going to the Javascript settings and selecting it from the Quick-add dropdown. However, if it's not working in your local files, you'll need to troubleshoot why. Double-check that jQuery is included correctly and ensure that the version is compatible with your code. Below is an example of the version that works in CodePen:

<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Expanding divs automatically depending on the content they contain

Currently, I have been developing a template for a database-driven page that is supposed to contain four divs for content arranged like this: ----- ----- | 1 | | 2 | ----- ----- ----- ----- | 3 | | 4 | ----- ----- The information in each box will always ...

Making changes to HTML on a webpage using jQuery's AJAX with synchronous requests

Seeking assistance to resolve an issue, I am currently stuck and have invested a significant amount of time. The situation at hand involves submitting a form using the traditional post method. However, prior to submitting the form, I am utilizing the jQue ...

Issues with div misalignment during jQuery animation

I have successfully created an animation where a child div inside a parent div moves up by -60px when the mouse enters the parent div, and returns to its original position when the mouse leaves. However, I am facing an issue where if the mouse moves direct ...

Enhancing Yii2 Navbar with Icons

I recently started working with Yii2 and I am in the process of creating a simple navigation bar using the built-in widget. The main challenge I am facing is how to include icons next to the menu options. The current state of my navbar is as follows: Na ...

Navigating nested objects within an array: A guide to iterating through multiple layers of objects

After receiving a payload from Firebase, I found an array with 3 objects inside, each of which also contains additional objects. Here is the screenshot for reference: https://i.sstatic.net/kII6g.png When I console.log my 'months' array, this i ...

There is a noticeable gap at the top of the scroll area in my Bootstrap modal

Hello everyone, I have encountered an issue with the modals on my website where the scroll area does not fit the page properly. Please refer to the screenshot below for reference. I have not applied any extra styles to the modals and I am unable to pinpo ...

Uploading and previewing multiple images on a canvas

After successfully creating single upload for images and placing them on canvas as seen in http://jsfiddle.net/StJnY/, I am now looking to adapt the script for multiple image uploads. Here is how I plan to modify the script: JS : $(function () { $(&a ...

Tips for changing the background color depending on the value

I am creating a table displaying the results of a tournament. Each team's final placement and original seeding will be listed. I plan to include a small bubble next to each team showing how their final placement compares to their initial seeding. To v ...

How can I use Bootstrap and jQuery to automatically resize the container class to a smaller size when the sidebar is activated?

After enhancing this question and adding more code to my example, I decided to repost it in a better form. However, despite wanting to delete this one, the instructions advise against it. If you're interested, feel free to check out my revised questi ...

CSS: Implementing opacity on background images within an unordered list menu items

My menu is made up of ul/li items with background images, but I'm having trouble adjusting the opacity and alignment of the images. While there are resources online for changing background image opacity, such as this article: https://scotch.io/tutoria ...

Retrieve information from a dynamically loaded page using jQuery

I'm currently attempting to extract text from a body that has been downloaded through ajax. I'm facing the problem that I can't inject this new body into an iframe or one of my elements because it contains scripts that could potentially bre ...

Which tools are best suited for Xamarin development?

Recently, I've been contemplating how to style my app. One common approach is using CSS, but the question that lingers in my mind is whether it's truly compatible and if I should begin utilizing CSS. Is there perhaps a different language that wou ...

Adjusting Images in HTML

I'm struggling to display 4 images on a single page in the desired sequence, similar to the example below: https://i.sstatic.net/3V1Ru.png Currently, my code only aligns the images to the left-hand side. Here is a snippet of my code: <style> im ...

Tips for effectively transmitting and managing a JSON object within an ASP.NET MVC controller

I am currently working on a project using ASP.NET MVC 4 and I'm facing an issue with sending a JSON object to a controller that is supposed to accept it. Here is the snippet of javascript and jQuery code I am using: var jsonObject = { "PlantShip ...

Is your custom shader material experiencing a lengthy initialization process?

After spending more than a year working on a raymarched project in three.js, I've noticed that as the complexity of the project has increased, so has the initialization time. It now takes over 40 seconds to load the project in the browser, but once lo ...

Having trouble updating the icon on my website using FontAwsome

Just a heads up - I'm not familiar with HTML/CSS/JS. This template is pre-made, and I'm simply making some adjustments to it. Hello, I'm currently working on my portfolio website and I want to display my projects based on the programming la ...

Generate a graphical representation with react-d3

In an attempt to create a histogram using react-d3-components, I have the following code: import React, { Component } from 'react'; import * as d3 from 'd3'; import * as ReactD3 from 'react-d3-components'; import propTypes fr ...

The Value Entered in Angular is Unsaved

I have encountered an issue with my app's table functionality. The user can enter information into an input field and save it, but upon refreshing the page, the field appears empty as if no data was entered. Can someone please review my code snippet b ...

Type of result from a function that returns a linked promise

In my class, I have a method that returns a chained promise. The first promise's type is angular.IPromise<Foo>, and the second promise resolves with type angular.IPromise<Bar>. I am perplexed as to why the return type of doSomething is an ...

Using Ajax and jQuery to fetch a record after submitting a form

I have a form that uses Ajax/jQuery to submit data to a database. The form is handled by a PHP script and successfully stores the information in MySQL. However, I want to display the submitted values on the page after submission. Although I am new to this ...