user3005003

0

votes
0

answer
14

views

React - modal from a link in a popover

I would like to launch a modal from a link in a popover in my React component. The modal works if I add the onClick function to any text/element on the page but if I add it to any element inside the popover it doesn't trigger. I added a console log to check this and the onClick function is never cal...
user3005003
1

votes
1

answer
49

views

wrapping selected nth childs in divs using jquery

I am trying to select divs and wrap them in bootstrap columns using the nth child. I have: At the moment I have tried (as the divs have the class 'news-v2'): var divs = $('.owl-news > .news-v2'); for (var i = 0; i < divs.length; i+=3) { divs.slice(i, i+3).wrapAll(''); } which gives the following out...
user3005003
1

votes
1

answer
58

views

Selecting an autocomplete input value goes to a link

I would like my website to load a new page depending on what a user selects from an autocomplete field. For example, if you select 'School of Arts' a page with information on the school loads, but a different page loads if you select 'School of History'. So far I have the autocomplete working and wr...
user3005003
1

votes
2

answer
246

views

PHP maths quiz program not displaying correctly [duplicate]

This question already has an answer here: PHP simple maths quiz program 2 answers Here is a simple maths quiz i've programmed but it's not displaying correctly. I want it to ask the question, then if the user responds correctly go to one webpage, if the respond incorrectly go to another. And if the...
user3005003
1

votes
2

answer
67

views

Using JS to expand/collapse divs with FAQs

I want to add some questions/answers to my site. At first I just want it to display the questions, then the answer if the user clicks on the question. This works so far, but how do I get it so the current question closes when another is clicked on? aka there should only be one question open at a tim...
user3005003
1

votes
1

answer
79

views

Displaying arrays in divs with classes using JavaScript

I am using JavaScript to display a list of data arrays on my website from Google sheets. At the moment the data is just printed as a long list so I would like to style it, starting by having each array in its own div. At the moment all the data is appended into the same div and is only separated by...
user3005003
1

votes
0

answer
7

views

React CSS Transition Group fade images in/out

I'm trying to fade images in and out, automatically when the page loads, one at a time using React's CSS transition groups. I've been following their documentation online but I can't seem to get it to work. I have the following CSS: .fade-enter { opacity: 0.01; } .fade-enter.fade-enter-active { op...
user3005003
1

votes
2

answer
574

views

Creating a 'slide-in' menu using js and css

At the moment I'm creating my navigation which will consist of several icons and when you click on each one a slide in menu will appear. So far this is the javascript and css i've tried. Unfortunately nothing seems to happen when I click on my icons. Explore Canterbury .infoIcon { background-image:...
user3005003
0

votes
0

answer
6

views

Search bar in Vue flickr app not giving expected results

I’m using Vue to create a Flickr app and want to add a search bar so users can search for photos containing tags with their search term. What i’ve done so far produces some results, but I noticed the photos don’t always include my search term as tags, for example if I search 'cats' the returne...
user3005003
5

votes
4

answer
7.3k

views

Grunt Warning: Path must be a string. Received a null

I'm getting this error when I try to compile with Grunt. I haven't used it much before but I seem to only be getting this error with this project and it works fine for other projects on my server. Running 'jshint:main' (jshint) task Warning: Path must be a string. Received null Use --force to contin...
user3005003
2

votes
2

answer
71

views

Adding a button to activity that opens a browser URL

I want to add a button to one of my activities (that displays a news article), so when the user clicks the button the article is opened in their browser. So far I have added the button in my xml and it appears. I'm just having some trouble with the click listener. Below is my code, i'm getting an er...
user3005003
5

votes
1

answer
3.9k

views

text-center and text-right not working in bootstrap

I want some elements on my page to align to the center and right, but the bootstrap classes 'text-right' and 'text-center' don't seem to work, even though 'text-left' does. Thanks. Account Your Account Profile Basket
user3005003
1

votes
1

answer
267

views

Expand/Collapse divs that push over divs down the page

I have 9 squares on a page, when you click on a square I want a full width div to appear underneath it and push the over squares down. I've been trying to follow a tutorial to understand the JS behind this, but I can't get it to work. Codepen: http://codepen.io/SaraTez/pen/QEmPjX One Two Three Fou...
user3005003
1

votes
1

answer
46

views

JS/CSS div expand not working

I have the code below which I believe should make the 'content_cards' appear when you click on the 'title' div, and then hide when you click on it again but it doesn't seem to be working. It just seems to refresh the page. I tried doing it by using the button as the selector but as I have other butt...
user3005003
3

votes
2

answer
198

views

JS countdown clock not counting down

I'm trying to implement a countdown clock on my page, it works in this snippet but not on the testing page and I'm not sure why as I have just copied over the same code. Here is the test page I am trying it out on: https://www.gkunions.co.uk/test/ $(document).ready(function() { function getTimeRem...
user3005003
4

votes
2

answer
3.6k

views

.js file works in chrome and firefox but not IE

When testing my website out in IE11 certain parts of it don't work and I believe the issue lies with my 'custom.js' file as all the problems link to that js. However, the page works perfectly in Chrome and Firefox. I load the .js file called 'custom.js' in the footer of my page along with other p...
user3005003
2

votes
1

answer
696

views

JS Countdown timer to a specific date

I have a js countdown timer that currently counts down from 33 days and this restarts everytime the page reloads. I want to change this so it's counting down to 16/01/2017 and therefore won't reset to the same amount everytime the page is loaded. I have tried setting the deadline variable to '12/01...
user3005003
2

votes
1

answer
598

views

Using owl-filter.js to filter through owl carousel items

I am using this plugin to filter through items in my owl carousel But it is not working, I have had various console errors, this is the current one: 'Uncaught ReferenceError: initOwlEvent is not defined' I have added the jquery.owl-filter.js in the footer of my page, and below this called the plugi...
user3005003
1

votes
4

answer
33

views

Content displaying outside of its div

I have several boxes (only one in the code snippet) which will have different amounts of content in each box, I want them to automatically resize to fit the content. At the moment the content spills over and isn't contained within the box. I have used overflow:hidden; but this doesn't seem to have h...
user3005003
1

votes
4

answer
62

views

Hide/reveal content in a div using js and css

I want to reveal content in a div by clicking on another div of an image. I have the basic idea working, but when i put content into the div it isn't hidden when the div is closed. I put a in and the is always showing even when the div is hidden. $(document).ready(function () { $('#header').clic...
user3005003
4

votes
3

answer
64

views

Prevent div from being clickable and interfering with javascript

On my website I have a webgl display of buildings, you can use the mouse to rotate the display and pan around. I then added a CSS animation of clouds, only when these clouds are in front of the webgl buildings it stops you from being about to use the mouse to rotate and pan. Is there a way of making...
user3005003
3

votes
2

answer
1.4k

views

cube portfolio with bootstrap template plugin not working

I am using cubeportfolio.js as part of a bootstrap template. It seems to be working but the custom .js part of the template is causing an error in the console. The template I am using can be seen here, which is working without errors. The error is 'Uncaught Error: cubeportfolio is already initialize...
user3005003
2

votes
3

answer
2.4k

views

Adding a progress spinner to app while data from volley loads

I'm trying to add a progress spinner at the top of my app while data is being received from the volley. There may be an easier way to do this but this is what i've tried so far only I have a few errors. The first error being newsListView getting the error 'varied is accessed from within inner class,...
user3005003
10

votes
3

answer
32.2k

views

Displaying a YouTube video with iframe full width of page [closed]

I've put a video in my site using an iframe from YouTube, while the iframe is full width (100%) the video is very small (height) within the frame. How do I make it fit the width of the container? Code: See screenshot
user3005003
3

votes
2

answer
568

views

Malihu custom scrollbar - scroll to id plugin not working in page

I'm using Malihu's custom scrollbar plugin and wanted to add the 'Scroll to id' plugin in conjunction with it. The code provided in my snippet works how I want it to (although sometimes the buttons don't seem to work). The main problem is when I put this code into my site something is preventing it...
user3005003
3

votes
1

answer
112

views

Creating a dropdown filter for JSON data in Vue

I want to use a dropdown that filters through my JSON data and displays different JSON data items if they match the dropdown option. So far I've managed to get it so a function runs when someone selects an item from the dropdown menu, but i'm unsure why the filter doesn't work, as i'm not getting an...
user3005003
0

votes
1

answer
35

views

Adding search function to android app. Being able to search list

I currently have a simple App that displays news articles from a url in a gridView. I have added a search icon to my main menu xml but I don't know how to get the search function to work. I just need it to display the relevant articles in GridView if the string the user searches is matches the artic...
user3005003