I have a gallery page with four different sections: art, tattoo, info and gallery. The first image of each is displayed in a DIV called imageWrap when the headings are clicked, while the arrow icons (visible on section highlight) cycle through the images and notes via variables which reference a number of arrays.
I want to make the arrow buttons reference the correct variable set dependending on which section is active. Is there a way to listen for the current gallery state and modify the action listeners to handle the correct variable?
The page with the issue is located here:
www.christopherwynne.com/tattoo
I am still fairly new at Java, and any insight would be greatly appreciated.
Well i suggest you learn some Javascript Basics to develop more attractive webpages, i don't think java work on here for doing.
if you don't know anything about Javascript i leave you this resource
Javascript its sexy
JSIS give you the best resource to learn property JS, also give you another tutorials for learn some others frameworks like Meteor
Also if you say "i don't have time to learn JS i need my tattoo web page and the gallery image working" take a look on this page
Codrops Images Galley
Its very easy to adapt to the current web and look pretty nice
Hope it helps
Related
Sorry if this question sounds stupid but im a noob with wordpress.
I am a javascript developer, and I want make a little game (or games) with wordpress. Opening main page there is a sliding puzzle. After complete, a button appears and clicking there you pass to another page. This is basically the same to all pages.
But I can't find were i put my javascript or HTML code. I create the pages but I can't edit them the way I want, everytime i try to do it i only can edit like word. I cant create, change or edit divs attibutes or tags. To be honest the only thing i can edit is CSS in stylesheet, but is too limited.
I have done the search, try found a solutions or ways to done it but when i look to tutorials is all diferent from what i see.
to give you an ideia I want to do a mix of this:
-> http://www.rustylake.com/room-escape-games/cube-escape-case-23.html
and this
-> https://ebonyriddle.com/
but i don't know how to edit page to page.
can you help me?
Thanks for everything
PS: I know I can do it without Wordpress, but I want use it anyway to learn more about the CMS (because of work) maintain website structure and later learn how to do my own templates or plugins.
To answer your question directly, yes it is possible (and easy, relatively speaking) to add custom code to every page / post of a Wordpress site.
More generally, you’re talking about creating a custom Wordpress theme, which you can find out more about here:
https://codex.wordpress.org/Theme_Development
and here:
https://developer.wordpress.org/themes/getting-started/ (Good suggestion from #ItsGeorge)
Regarding adding custom JavaScript to a theme, your files will need to be enqueued as per these instructions.
Outlining the steps involved in Wordpress theme development would go beyond the scope of your question, but there are plenty of resources online and answers to Wordpress specific questions on wordpress.stackexchange.com. You will need to familiarise yourself with php as well as JavaScript, to take full control of Wordpress.
I would say that developing a game feels like an odd fit... If learning Wordpress is your objective, a blog or personal website might be a better place to start, then you could move onto a game once you are familiar with the concepts involved, e.g. the loop, which plays a huge part in how Wordpress works
Good luck!
The primary focus of WordPress is to put HTML code and JS out of the user. You might manage your extra JavaScript files with your theme customization. If you want to get more control about how your pages are rendering, you should use action hooks and filters. The simplest way for you is to override each page template like this
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page
The preferable resource to ask Wordpress related questions is https://wordpress.stackexchange.com/
I'm trying to set up a page which will have multiple elements in it. Could be something like books galery where when you click on the thumbnail a modal opens up with the picture of the book, link to publisher (or personal book page) and a description.
I was wondering whether it's more prudent to generate 1 modal per thumbnail (no js needed to manage anything and quick setup) or to setup one modal in which that data would be overwritten depending on which thumbnail you're clicking (less html generated but more complex to set up requiring js and storing information somewhere like data attribute).
I've seen a lot of topics and coverage regarding modals but haven't seen question like that asked so far. Everyone seems to be spamming countless modal "elements" without question.
Could someone shed some light on this for me?
The more efficient and future proof approach would be to incorporate JavaScript. As you would only be storing the data for each book and a single template modal this would conserve bandwidth. Additionally, what if you wanted to add more books? Just adding the data to the "books" array would be much easier in the future rather than having to create a new modal for each new entry.
However, if the gallery size is very small it may not be worth the time and effort to do this.
Hence, this is a design choice, it's up to you to decide what would be the ideal approach for your project.
This is my first question here, I'm very new to coding so please forgive me any mistakes.
So i started learning html/css/some basic javascript recently and I'm trying to build a website just for practice. So one page on it looks like this:
https://imgur.com/ZHyeprC
And right now i have different html files for each article (linked under the site navigation: Shauna, The First One etc.), so each name of the article takes you to a different page.
What i want to do is to have multiple articles in just one html file, and make them show up/disappear when the name of the article is clicked.
I tried to figure it out somehow in jquery, but i only managed to wrap the article in a div and make it appear when the invisible div is clicked... which isn't much useful.
So is it posibble to do with simple javascript/jquery? If so, the how do i do this?
Thank you all in advance, Michal.
The most easy and practical way is to have one HTML file for each article. It makes your files more organized and easier to find. Otherwise, if your client just want to look at one article the page has to load all articles which may take longer if the client happens to have a slow internet connection.
Basically this is the first time when i ASK A QUESTION on stackoverflow. Anyway i will really appreciate if someone can point me to some direction about creating an simple product catalog app using html5+xml+js.
Well the structure is the following:
A: Home page >click> Product Categ >click> List of Products >click> Product Page Description
I'm not sure how shall i create the dynamic pages for the products to be able to extract all the products description from XML whenever click on any of product from the list page.
For example i have 10 products on the page, when i click on product X, an dynamic page with the product X 's (image, description, price) to be created, and so on.
I hope all of these things make sense for you and thanks a lot for your precious time.
For reading XML files using JavaScript, check answers from this question. For HTML5 and JavaScript in general I suggest you to check tutorials for some basics:
JavaScript - http://www.w3schools.com/js/default.asp
HTML5 - http://www.w3schools.com/html/html5_intro.asp
You can also check jQuery library tutorial. And here is jQuery's website.
I think that you should read some basics to learn how to look for more in the web and search for "how-to" connected with specified things you want to do and still don't know where to start.
EDIT:
If you want to check something that you'll need exactly at the beginning, you can check this documentation of addEventListener JavaScript method that will allow you to set action that will be invoked when particular event of the element fires. You can also check links connected to jQuery I mentioned above - jQuery is JavaScript library that makes writing JS simplier. But with both JavaScript and jQuery you have to spend some time reading documentation to know what you can do and how to achieve it.
I'm trying to accomplish something that might be relatively simple, but I don't know what I would call it (if there is a specific name for it), hence my searches have proved useless.
What I'm trying to accomplish is simple: I have a page built off off the Masonry jquery plugin (similar to http://designshack.net/tutorialexamples/masonry/demos/masonry.html). All I want to do is that when I click on a specific picture, it creates a "box" that fills up part of the screen and can contain another webpage (to describe the picture) while fading out most of the background. Then when I click outside of the box, it returns to all of my pictures.
I've seen this before, as I'm sure everybody else has, but for the life of me I cannot remember an example to look at or how best to do this. I don't have too much experience with javascript or jquery (which is why I'm asking this), but any help to point me in the right direction, whether it is using javascript or html/css, would be great.
If anybody does get the gist of what I'm describing and can explain it better, then you're more than welcome to edit..
What you need are modal windows.
I know the twitter bootstrap has built a pretty good framework for this:
http://getbootstrap.com/javascript/#modals
If you aren't using the bootstrap directly you might be able to pick out what you need.