JQuery :: Cycle -- Hiding And Showing 'prev' And 'next' Links
Sep 15, 2010
well, I thought this wasn't a cycle question specifically, but it looks like it is. [URL]
in case it's not ok to just post link to my post about this on "using jQuery" forum:
this is code in cycle plugin to hide "next" nav at last slide, hide "prev" nav at first slide:
$('a#prev')[index == 0 ? 'hide' : 'show']();
$('a#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
but what if instead of just 'hide' and 'show' I want to call a function (because I want to, let's say, just change the font-color of the link instead of hiding it)? so I did:
$('a#next')[index == opts.slideCount - 1 ? 'disableNext' : 'showNext']();
}
function disableNext() {
$('a#next').css('color','EEEEEE');
[Code]....
(and what I actually want to do is change the link to a non-link by doing sthg like $('span....').html(change code to non-link..), etc... )
View 4 Replies
ADVERTISEMENT
Sep 13, 2011
Im using the goto function for a questionnaire to go to different slides/questions, i also want to add a back/prev button but i want it to go back to the previous slide it was on instead of going back to the prev slide in the stacking order.
View 4 Replies
View Related
Mar 15, 2011
I'm rather new toJavaScriptand have spent all day trying to figure out how I can make this possible by examining others code but to no avail. I've finally bit the bullet and come to ask for some help.
I'm making a website for a friends photography and have managed to get a thumbnail gallery working as you can see here[URL]...The problem is I have no idea how to get get the prev and next links working. I have tried countless searches for the best part of the afternoon looking for a solution but mostly all I seem to uncover is lists ofpre-madegalleries andcarousels.
It would be fantastic if someone could point me in the right direction just to simply get these links incrementing and decrementing based on the image that is loaded.
View 1 Replies
View Related
May 24, 2011
I've been working with the Cycle plugin for a while, but the only problem I'm having is that if I pass a string of transition names (comma separated), the next button goes through them in the right order but the prev button does not use the previous transition as one would expect. It uses the next transition in the list given as input. I've looked around but I could only find people fixing it for scrolling horizontally. I want it to maintain the order of transitions passed as input, not a reverse animation effect.
View 3 Replies
View Related
Jan 28, 2011
I have this cycle slideshow demo, zip. In Internet Explorer is all fine but in the Firefox hide the buttons. I tried to change and turn the divs but still was not right. Why happens this?
View 4 Replies
View Related
Jan 26, 2011
I am using the jQuery cycle plugin for several slideshows at the same time in Drupal. The problem is when there is only one image in a slideshow, then I want the "prev" and "next" buttons to be hidden away. I can get:
Drupal.behaviors.image_slider = function (context) {
$('#block-views-work-block_1 .views-field-field-work-images-fid .field-content').each(function(i) {
$(this).after('<div class="slide-pager"').cycle({
fx: 'scrollHorz',
speed: 500,
timeout: 0,
nowrap: 1,
sync: 1,
easing: 'easeInOutQuint',
activePagerClass: 'active-slide',
pager: $('.slide-pager').eq(i),
prev: $('.prev').eq(i),
next: $('.next').eq(i),
after: function (curr,next,opts) {
$('.caption').eq(i).html(this.alt);
var msg = (opts.currSlide + 1) + ' av ' + opts.slideCount;
$('.msg').eq(i).html(msg);
}});
});
};
View 4 Replies
View Related
Jun 3, 2009
I tried to use Cycle Plugin, and it works great. I have the "Previous and Next" navigation work without any problem.
This is the code I have:
View 1 Replies
View Related
Jul 22, 2011
So, what I'm trying to do is embed links inside a cycle slide show. Here's an example:
[Code]...
As you can see, I'm using a div tag in place of an image and setting the image as the BG of the div. Then I'm overlaying some text and links on the "slide". When I click the links however, the result is animation invocation rather than link target invocation. The div click event is takingprecedenceover the link click event. Is there a built in handler in the Cycle library to handle this?
View 2 Replies
View Related
Dec 20, 2009
I have an application, that will pull all articles associated with a user on a page.As some users have posted approx 100 articles, I want to hide all but the first 5, then have a link that will show the next 5 or the remaining article that are hidden (if less than 5)I have the following code:
jQuery.noConflict();
var numShown = 5; // Initial rows shown & index
var numMore = 5; // Increment
[code]....
View 1 Replies
View Related
Jul 29, 2009
<script type="text/javascript">
Above is my JS. What I want to do is, click the button and have the vstar image hidden. Then when I click on the button again, the vstar appears, but now the flower is hidden. And clicking the button again, the vstar is hidden and the flower appears again, and so on...
<div>
View 7 Replies
View Related
Sep 16, 2010
$(document).ready(function()
{
$(".postTags_opener").click(function()
{
$(this).next(".postTitle .postTags").fadeIn(1000, function()
[Code]....
The indentation is probably a little wacky, since I just copy/pasted, but that's what I've got right now. When you click on .postTags_opener, it shows the nearest matched .postTags; that is exactly what I want, since .postTags immediately follows a .postTags_opener. The problem arises when I then try to close it: .postTags_closer comes after .postTags starts, so that's probably why next() is bugging out.
View 2 Replies
View Related
Jun 20, 2010
I'm new to jQuery, and I'm having issues with showing my DIVs correctly. The problem with the script at the moment, is that it currently opens up every single .display div, whereas I only want it to open up the one which corresponds to the.input a.edit which I've clicked.
The script hides them individually, displays the hide button and makes the show button display correctly like I wish, but it's displaying all the the .display div's at the same time which isn't what I want. For reference here is my jQuery script:
[Code]...
View 7 Replies
View Related
Aug 6, 2010
i have an html page, in it there is input box
<input type=button id="parambtn" onclick="paramProcess(this);" value=v />
now when we click this button it will show a corresponding div objec, which is the parent div called 'frame1'. this div has two radio buttons "static" and "dynamic".
if the user clicks on static radio selection, i want to show a stDiv. here is the problem as this stDiv is not showing up on click event.the function is getting called as i had checked it using an alert.
if the user clicks on dynamic radio selection, i want to show a dynamicDiv, this is also not working.
this is the code.
<div id="frame1" width="20px" height="50px" style=";display:none;background-color:red;" >
<table>
<tr>
[Code]....
i would also like to add one more problem. right now, when we click on button, it shows the frame Div, but this displaces all the other elements in the page, which are inside a table. is there a way to show this div above other elements without any changes in their position.. i tried to change the z index of the frame Div, but nothing changed..
View 1 Replies
View Related
Aug 16, 2010
If you want to see what I'm talking about at any point, go to [URL] and hit the "web" button in the top-rightish area. Or, you know, check the source code, because you can't see any of that stuff right now.
So, I'm working on a portfolio for myself. And I want to make it for myself, because, well, I don't want to be lame.
My portfolio has three parts: stuff I've designed on the web, stuff I've written, and other stuff. Those are separated by the three buttons in the top right. You hit one, and the old visible item fades out, and the new one fades in. It's pretty.
Now, the "web" section is the problem. Right now, the div associated with it contains 3 div's. Each of those divs contains a p, and is not visible by default. On ready, I do this:
function readyFunction()
{
var pages = [];
submenu();
[Code].....
But when I try it out, nothing shows. It should show the first element, right?
I am aware that by calling toArray(), I am turning jQuery objects into DOM objects. That's not the problem, is it? How would I fix that?
View 1 Replies
View Related
Mar 10, 2011
I'm getting started with jQuery. I want to write a form where I can add and hide fieldsets.At the end there is a button "add Theme". If I click on it, the next fieldset whose display is none should be shown. And every fieldset except the first one have a button remove. This is my code, but it doesn't work .
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>[code]....
View 2 Replies
View Related
Mar 11, 2011
I am new to jQuery and can't get this to work properly. I am loading content form a php page through an AJAX call. Based on the data that is returned I want to fade in a DIV or keep it hidden. Therefore I have a if construction that checks the data that was inserted in a DIV from the PHP page. If the PHP page returned 'No data' the DIV should remain hidden. The loading part works OK, but somehow the hiding or showing of the DIV doesn't work. What am I doing wrong? Is the syntax correct? This is what I have now:
<head>
<script type="text/javascript">
$(document).ready(function() {
[code]....
View 3 Replies
View Related
Jan 18, 2010
Is it possible using slideToggle to set a faster speed for hiding than for showing?
View 4 Replies
View Related
Aug 28, 2011
at [URL] I am using jquery cycle in 5 divs. As you will see, in 4 of them it works perfectly, but in the main image it is only showing every second slide and fading to blank on the others.
Yes, all the images are there.
The weird thing is that I essentially copied and pasted this code for the lower areas and they worked perfectly straight off.
View 2 Replies
View Related
Oct 7, 2010
I awhen it comes to "developing" jQuery but I am trying to do something that is seemingly something simple but I can't for the life of me, figure out the best way to do it.
http:[url].....
Here, you'll see the area below the navigation that has five buttons which are supposed to help scroll between the five associated divs.All I want to do is hide the currently shown div and then slide in the div associated with the button clicked.http:[url].....Here is what the animation is SUPPOSED to look like but the problem is is that the correct one uses Prototype and I am trying to use only one library and jQuery is the most suitable because I use it for other effects in the site and jQuery and Prototype obviously don't mesh well.
View 3 Replies
View Related
Sep 29, 2010
i am having some problem showing and hiding some divi want to show the div with the id="universitiesDiv" on one point and the div id="highSchoolsDiv" on another depending on the user choice of selected option.
function Show (titleImg){
// the id of the content element from the id of the title element
var contentID = titleImg.id.replace (/title/, "content");
[code]....
View 11 Replies
View Related
Sep 28, 2010
i am having some problem showing and hiding some div.i want to show the div with the id="universitiesDiv" on one point and the div id="highSchoolsDiv" on another depending on the user choice of selected option.
View 10 Replies
View Related
Oct 30, 2010
I was wondering if anyone wanted to take a shot at re-factoring my code. I am not a javascript guru, and I would like some feedback on what I could do to make it better.The code shows/hides the top div, and when the top div is hidden, the bottom div takes up the space of the top div.
View 3 Replies
View Related
Aug 5, 2010
This is something of a continuation from my previous problem[URL]The images seem to be showing properly the first time. Unfortunately, when the slide show starts, Chrome is showing the last image in the group first. This wouldn't be a problem normally, but I plan in showing the images in an order based on their last modified info.
View 4 Replies
View Related
Jan 18, 2006
Firstly, please understand that this is a very big web application. There is a "tabbed" interface that allows one to switch from page to page... On each page, there are tables.
Each table has a "minimize/maximize" function that will resize the table and hide/unhide specific columns in the table...
Right now, the tables are constructed as HTML tables. The TD's that are to be hidden are given the class "hidden[tableName]" whatever the table name may be.
When the table is maximized, i execute the following function:
function changeVisibleByClass(element, className, display){
var allPageTags = new Array();
allPageTags=document.getElementsByTagName(element);
for (i=0; i<allPageTags.length; i++) {
if (allPageTags[i].className==className){
allPageTags[i].style.display=display;
}}}
This has gotten to be quite inefficient and slow because it loads all of the visible TDs in the HTML and then checks each one for its classtype, changing the visibility as necessary. This works fine for a small page, but as my tables grow, this is becoming horribly inefficient.
View 4 Replies
View Related
Apr 18, 2011
I have a card at the bottom of my page that when a user clicks, will appear to come out from under the page and move back on top of it.
The first bit seems to work ok, but I cant get it go back under the page.
this is what I have.
Code:
$('.card').css({"margin-top":"-150px",}, 1000);
$('.card').click(function(){
$(this).animate({"margin-top":"15px",}, 700, function() {// Animation complete.
$(this).addClass('ontop');
[Code]....
Also I understand I'd need to build in some 'fail safes' like if it is already ontop dont do the animation, etc
View 9 Replies
View Related
Apr 15, 2003
I have a question. If you have a HTML list that pops up as a menu under a graphic in a layer when you mouseover the graphics, how do you instruct that layer to vanish again when you mouseout from the menu?
I can do onMouseOver show the layer and onMouseOut hide the layer, but I'm stuck when it comes to applying that to a larger area (ie: multiple clickable items). I can think of ways of doing it, but they're a bit clunky and I'm assuming there's a good or 'proper' way of achieving this.
View 6 Replies
View Related