- Screen name: angela
angela's Profile
18 Posts
20 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
Please see this fiddle I have set up.
You are first confronted by three links. Each link triggers divs to slide out.
-
The link 'john smith' slides out and in at the speed we want. When it slides out the first line slides out then when that is completed the second line slides down as though coming from the first. When it slides back it does the same motion at the same speed but reverse i.e.. the second line slide back up first and then when that is completed the first line slides back to the left.
-
When you click on the work link and menu slides out in the same manner as the bio. Also there is a sub menu that slides out when on clicks on item 2.
-
When the user clicks on the contact link one line slides out.
What we need to achieve is this; when any div is open and another link is clicked on, the visible div slides back in reverse to how they slid in. We have almost achieve this, however, the code is not quite right as the divs are not sliding back in at the same speed and in the right order, they simply slide back fast. For example, if one has clicked on 'work' and the 'item 2' link, and then you select 'contact' the opened div slide back very quickly. What I need to achieve is that they slide back in reverse to how they slid out.
To attempt to make it clear, if you click on 'work' and then 'item 2' so with menus are visible and then click on work again, you will see the sub menu slides away first before the first menu. You will also notice that the items that slide up slide back down first before the divs slide back to the left. This is what needs to happen if you click on 'contact' or 'john smith' when the menus are visible.
I know this sounds very complicated and if I can answer any questions to make it clearer I will.
Thanks
- 08-May-2014 08:45 AM
- Forum: Using jQuery
please see this example http://intelligen.info/index.html
The menu at the top of this page has opacity set at 0 and when you hover at is change to 1. This works fine in firefox but if you view it on safari and chrome some of the menu sticks and doesn't fade out when the hovering has stopped. Anyone know how to prevent this sticking on safari and chrome?
$('#nav, #logo').hover(function() {
$('#nav').fadeTo(1,1);
},function() {
$('#nav').fadeTo(1,0);
});
$('#lfw-link, #lfw').hover(function() {
$('#nav, #lfw').fadeTo(1,1);
},function() {
$('#nav, #lfw').fadeTo(1,0);
});
$('#clients-link, #clients').hover(function() {
$('#nav, #clients').fadeTo(1,1);
},function() {
$('#nav, #clients').fadeTo(1,0);
});
$('#personal-link, #personal').hover(function() {
$('#nav, #personal').fadeTo(1,1);
},function() {
$('#nav, #personal').fadeTo(1,0);
});
$('#video-link, #videos').hover(function() {
$('#nav, #videos').fadeTo(1,1);
},function() {
$('#nav, #videos').fadeTo(1,0);
});- 08-May-2014 08:39 AM
- Forum: Using jQuery
At the moment I am using jquery.ba-hashchange.min.js and dynamicpage.js to load the content dynamically from the index page and therefore keeping the header in one file. However, the jquery.ba-hashchange.min.js is interfering with other jQuery in my content.
The code in the content that is not working is as follows:
$(".thumbnails").on("mouseover mouseout", 'img', function () {
var alt = $(this).attr('alt');
$('.displayed-image > img').each(function(index, element) {
var el = $(element),
visibility = el.attr('alt') === alt ? 'visible' : 'hidden';
el.css('visibility', visibility);
});
});This code makes hidden images visible when the user hovers over the thumbnails. You can see this working here http://intelligen.info/instagram-randoms.html
However if you navigate to this content using the menu at the top of the index page herehttp://intelligen.info Personal > Instagram Randoms , the code is not working. Can anyone tell me how to make the code work with the menu?
- please see this fiddle http://jsfiddle.net/rabelais/3dSra/15I have here a video and an audio element.How do I write the code so the audio plays automatically and loops when the video is finished.var video = document.getElementsByTagName('#myvideo1')[0];video.onended = function(e) {/*Do things here!*/}
- 11-May-2013 08:07 AM
- Forum: Using jQuery
I am trying to simply style my select box so the text is centre aligned. It works in firefox but not in safari or chrome. I am thinking someone might know a little bit of jQuery that might do this?
http://georgewoolfe.com/yogurtline.html
Thanks for your help.
Angela
- I need to make my navigation of this website work from a drop down select tag. I realise this
will involve a bit a jQuery. this is how my HTML looks so far :<div id="top_nav">
<select>
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<option value="">4</option>
<option value="">5</option>
<option value="">Contact</option>
</select>
Thanks Bas
On this page http://kimcolemanprojects.com/ I need to have a drop down menu that opens on click and closes again on click of same anchor. Like it works on this site http://angela-moore.co.uk/
this is my html for the menu so far:
<div class="left" id="nav"> <ul id="menu"> <li id="light"> <a href="lighting_video.html">Lighting + Video</a> <ul style="display: none;"> <li><a href="django_django.html">Django Django</a></li> <li><a href="suntrap.html">Suntrap</a></li> </ul> </li> <li id="photo"> <a href="photograms.html">Photograms</a> </li> <li id="about"> <a class="active" href="about.html">About</a> </li></ul> </div><!--end nav-->
As you can see I only need it to work within one list item. I need help writing the javascript for this.
Thanks for any help.
Angela
- 26-Dec-2012 11:35 AM
- Forum: Using jQuery
On this page http://kimcolemanprojects.com/djangolive_1.html there are five videos.
When you click on each video the next video scrolls up into view with jQuery.
Because of this jQuery effect, I had to disable the video controls. So I decided to put a play/pause button to the left of each video.
However, I now need some help with making a script that will change the button when each new video scrolls into view. I have a piece of script that changes the titles as the different videos scroll into view, which is also on the left of each video, please see script below.
- $(window).load(function () { // Scroll to titles on click
- $('a').on('click', function () {
- var target = $(this).attr('href');
- $('html,body').animate({
- scrollTop: $(target).offset().top
- }, 'slow');
- return false;
- });
- // jQuery `inView`-expression
- $.extend($.expr[':'], {
- inView: function (el) {
- var width = $(el).width(),
- height = $(el).height(),
- offset = $(el).offset(),
- vp_dimensions = {
- height: $(window).height(),
- width: $(window).width()
- }, y_offset = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop),
- x_offset = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
- return(offset.top < (y_offset + vp_dimensions.height) && offset.left < (x_offset + vp_dimensions.width) && (offset.top + height) > y_offset && (offset.left + width) > x_offset);
- }
- }); // Change the titles on scroll
- $(window).scroll(function () {
- $('li').each(function () {
- var self = $(this),
- title = self.find('video').attr('title');
- if(self.is(':inView')) {
- $('#title').find('h2').text(title);
- }
- });
- }).scroll();
- });
Thanks for your time
Angela
- 20-Dec-2012 10:34 AM
- Forum: Using jQuery
Hello,With jQuery can I trigger a video to play and then pause when a single anchor is clicked on?I have a page with 5 videos on it, I don't want to use the controls on the videos themselves, thinking of putting an anchor next to each which will say play. Click it the video plays, the play text changes to pause, click it again it pauses and returns to play again.you can see this page at http://kimcolemanprojects.com/djangolive_1.htmlThanks- 17-Dec-2012 08:33 AM
- Forum: Using jQuery
Hello,I have a page where my content, which are images, scrolls down and has a fixed title on the side. I require the title on the side which is a fixed div, to change as the images roll up, to describe each image.Please see http://kimcolemanprojects.com/artworks.htmlthanks for any advice on how to achieve this.angela- 16-Dec-2012 04:43 AM
- Forum: Using jQuery
Hello,I want to achieve this effect but vertically not horizontally.I want it to be one page that you can scroll through if you wish using scrolling but if you click on the image it slides neatly to the next image down.I have looked for a plugin but cant find one. I am sure there would be a very simple bit a jquery that would do this?Thank youAngela- 13-Dec-2012 09:45 AM
- Forum: Using jQuery
Hi,I have this script which shows hidden images when mouse hovers over link$(document).ready(function(){$("#test").on("mouseover mouseout", "li", function () {$("#" + $(this).data("img")).toggle();});});It works with other versions of jquery but not with version 1.4.2, which I really need to use for other scripts on my page. Anybody know how this script can be changed to work in this older version.ThanksAngela- 07-Dec-2012 04:21 AM
- Forum: Using jQuery
Is it possible to link different scripts to different version of jquery on one page?For example on this page http://kimcolemanprojects.com/ my scrollto jquery does not work on chrome with latest 1.8.3 query but does work with older 1.4.2 version.However my other script which is mouseover image displays does not work with this older 1.4.2 version.Any ideas???Thanks for your time.Angela- Hello,The jquery scrolling on this page http://kimcolemanprojects.com works on safari,firefox and opera but does not work on a chrome browser, does anybody know why?Thanks very much for any response.Angela
- How can you make a whole div that contains both text and images fade in from left to right when page loads? Is it possible?On this website http://www.suburbia-media.com/site/ they have the effect i want but they are using flash, and it moves top to bottom.ThanksBaselitz
- 02-Oct-2012 09:40 AM
- Forum: Using jQuery
Hi,
On my page there are four columns of images. please see http://i-n-t-e-l-l-i-g-e-n-t-s-i-a.com/entry.html
There is some jquery (which is commented out at the bottom of the html, see script below also) that converts all images to black and white and when you hover they fade to colour, which is what i am trying to apply to these images. however when i do apply it it totally changed my css. Dow anyone know how I get this to work on my page?
$(window).load(function(){
$(".wrapper img").fadeIn(500);
$('.wrapper img').each(function(){
var el = $(this);
el.css({"position":"absolute"}).wrap("<div class='img_wrapper' style='display: inline-block'>").clone().addClass('img_grayscale').css({"position":"absolute","z-index":"998","opacity":"0"}).insertBefore(el).queue(function(){
var el = $(this);
el.parent().css({"width":this.width,"height":this.height});
el.dequeue();
});
this.src = grayscale(this.src);
});
$('.wrapper img').mouseover(function(){
$(this).parent().find('img:first').stop().animate({opacity:1}, 1000);
})
$('.img_grayscale').mouseout(function(){
$(this).stop().animate({opacity:0}, 1000);
});
});
function grayscale(src){
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var imgObj = new Image();
imgObj.src = src;
canvas.width = imgObj.width;
canvas.height = imgObj.height;
ctx.drawImage(imgObj, 0, 0);
var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);
for(var y = 0; y < imgPixels.height; y++){
for(var x = 0; x < imgPixels.width; x++){
var i = (y * 4) * imgPixels.width + x * 4;
var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3;
imgPixels.data[i] = avg;
imgPixels.data[i + 1] = avg;
imgPixels.data[i + 2] = avg;
}
}
ctx.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height);
return canvas.toDataURL();
}
Also is it possible to apply it to each column as a whole rather then the indiviual images, so the whole column (div) of imgs changes to color when mouse enters the div?
Really would appreciate any help. Thanks
Baselitz
- 01-Oct-2012 10:09 AM
- Forum: Using jQuery
hello everyone,i need some help please.On this page there are four columns of images.There is some jquery (which is commented out at the bottom of the html, see script below also) that coverts all images to black and white and when you hover they fade to colour, which is what i am trying to apply to these images. however when i do apply it it totally changed my css. how can I get this to work on this page?$(window).load(function(){$(".wrapper img").fadeIn(500);$('.wrapper img').each(function(){var el = $(this);el.css({"position":"absolute"}).wrap("<div class='img_wrapper' style='display: inline-block'>").clone().addClass('img_grayscale').css({"position":"absolute","z-index":"998","opacity":"0"}).insertBefore(el).queue(function(){var el = $(this);el.parent().css({"width":this.width,"height":this.height});el.dequeue();});this.src = grayscale(this.src);});$('.wrapper img').mouseover(function(){$(this).parent().find('img:first').stop().animate({opacity:1}, 1000);})$('.img_grayscale').mouseout(function(){$(this).stop().animate({opacity:0}, 1000);});});function grayscale(src){var canvas = document.createElement('canvas');var ctx = canvas.getContext('2d');var imgObj = new Image();imgObj.src = src;canvas.width = imgObj.width;canvas.height = imgObj.height;ctx.drawImage(imgObj, 0, 0);var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);for(var y = 0; y < imgPixels.height; y++){for(var x = 0; x < imgPixels.width; x++){var i = (y * 4) * imgPixels.width + x * 4;var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3;imgPixels.data[i] = avg;imgPixels.data[i + 1] = avg;imgPixels.data[i + 2] = avg;}}ctx.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height);return canvas.toDataURL();}Also is it possible to apply it to each column as a whole rather then the indiviual images, so the whole column (div) of imgs changes to color when mouse enters the div?Really would appreciate any help. ThanksBaselitzI want to activate a typewriter effect when mouse hovers over image. The image points at a flashing cursor, I want the cursor to look like it is typing out the text;
DESIGN STUDIO
and then the cursor to disappear once that has been written.
please see http://i-n-t-e-l-l-i-g-e-n-t-s-i-a.com/entry.html
- «Prev
- Next »
Moderate user : angela
© 2013 jQuery Foundation
Sponsored by
and others.
-