JQuery :: Keep All Items From Toggle ON?
Jan 26, 2010
I am trying to put the finishing touches on my client's website. The site was built with Wordpress as its CMS. For the site's 'Photos' page, I used the NextGen Gallery plugin to manage and display the image gallery. We (my programmer) made some modifcations to the plugin so that users could upload images from the frontend of the site. That was no problem.
Then I added a jQuery script that toggles each image's description text OFF and ON. It looks good on the 1st page of the gallery, but then if you click to page "2" you get taken to a screen that shows all the descriptions toggled ON. I don't know what's doing it, but something is causing all of these descriptions to show at once, which is NOT what we want.
Here's the jQuery script I am using (it's in no-conflict mode so it plays nicely with the other code libraries in wordpress):
Code:
var $j = jQuery.noConflict();
$j(function(){
$j(document).ready(function( ) {
[code]....
how I can make a 'description text box' disappear/fadeout when another one gets clicked? Right now you actually have to go back and re-click each one before it toggles OFF, which starts looking terrible after you've clicked a few of them.
View 7 Replies
ADVERTISEMENT
Dec 29, 2009
I'm looking for a lightweight way to be able to switch between 2 divs on a page.
I have found various ways to do this online with jQuery, but none of which are able to handle multiple switches and make it extendable across the pages of my website efficiently.
For example I could have 12 - 15 individual elements on a page (All with same style) each with an option to switch content e.g. "Click here to do something" then once clicked "it would reveal something" (Within that element/<li> tag) - so it's element specific.
For example:
Code:
<ul>
<li class="box>
Title
[Code]....
But of course as it's element specific you have to associate each id together but you can't have two id="2" - as that won't validate.....
Looking around, a perfect example can be seen at: [URL]
And because it's CMS driven and will have multiple categories/pages, you can't list all the id's with the javascript, so it has to be portable/OOP (Is that the word?) so just a main identifier in the JS...??
Where you click to reveal code and it switches div, but only for that element, it doesn't effect anything else.
View 2 Replies
View Related
Jun 2, 2010
I'm trying to toggle the on and off class on list items but having issues it working.
I only want the 'on' class on the element that is clicked. So if another element in the list is clicked it removes the 'on' class from the one that had it to the one that has been clicked.
$(document).ready(function(){
View 1 Replies
View Related
Jun 17, 2011
I have a nested lists which contain city names, and then level 2 is businesses in that city. those are hidden by default so that when you click on the city name the businesses will slideToggle down. What would be the correct script to enable this.I have the effect working, but when I click on any of my top level anchors all of the nested items toggle. I want each city's businesses to act independently from each other.
see example below
<ul id="cityList">
<li><i>Albuquerque</i>
<ul class="city">
<li><a class="parkTitle" href="#">American RV Park</a>
[code]....
Here is the script i currently have
$('ul.city li a.parkTitle').click(function(event){
event.preventDefault();
$('.parkInfo').slideToggle();
});
example when I click on "american rv park" the div "parkInfo" directly below that first link would toggle
View 1 Replies
View Related
Jul 15, 2009
I have just started out in jquery and thought it would be cool to add some effects to my football clubs site.
I have a players page with a list of players. In the past each player link would open a new individual profile page. This was not ideal.
Now i want to create a list of players names that show a small bio below their names when their link is clicked.
I have created some code but it just shows the bio of all players when a link is clicked. There are lots of links so repeating all the code with unique id's i believe is not the best solution.[code]...
View 1 Replies
View Related
Jan 9, 2009
Was wondering how to accomplish this.I have several table rows that I would like to hide all with the push of a button.For instance:
Code:
<tr id="objects_row1"><table class="apples">
<tr id="apples_row1"><td>asdf</td></tr>
[code].....
View 4 Replies
View Related
Jan 10, 2010
version of Apycom's jQuery menu; you can find itat http://apycom.com/ and it is looking really good.I have uploaded files, and published it on a test site - www.flexin.beUnfortunately, some of the submenus starting from the second that haschildren elements, it adds the item on the top level in InternetExplorer.Does anyone on this list has any experience with this library?
View 2 Replies
View Related
Feb 22, 2011
I'm extremely new to jquery and trying to write a toggle function without using the built-in functionality. From what I've read, this should be a fairly straightforward exerciseHowever, I'm running an issue. My code doesn't seem to do anything. Not clear to me why because nothing is erroring out? Here's what I've got:
<html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> // we will add our javascript code here
[code]....
View 1 Replies
View Related
Sep 1, 2011
here is my scenario:
I have a link and a div on a webpage. With the link I want to toggle the content (HTML) of the div. On toggle, I want to load the content from a PHP-file and I want it to load on the toggle, not when the webpage originally loaded (to reduce loading time on the webpage itself).
The file that is loaded on toggle doesn't have to be PHP, but it would help a lot.
View 1 Replies
View Related
Feb 25, 2011
I have an ASP.net page where I load a record set server side and upload it into a listbox. I'm trying to do all the movement functionalities of the listbox items client side. Specifically, I'm trying to figure out how to copy selected listbox items from one listbox to another -- on button click. I've searched for a while, but every example that I found moves the actual item into another listbox, I just want to copy the selected item to another listbox.
View 6 Replies
View Related
Dec 17, 2010
I'm having trouble with a plugin system that I'm working on. It involves binding a doubleclick with two elements that have the same id. The two elements are different plugins, and load appropriately, however the dblclick binding seems to not change between elements. Here's my code(simplified):
$("div.editor").droppable({
drop: function(event,ui) {
objID = ui.draggable.attr("objID");
$.getJSON("objects/"+objID+"/object.json", function(data) {
[Code]....
View 1 Replies
View Related
Jul 28, 2010
I'm all new to jQuery and have the following problem. I'm sure the pros here can give me a hint, how i do it the right way:
<div class="images">
<img id="id-14" src="Jack" />
<img id="id-22" src="Dan" />
[code]....
View 1 Replies
View Related
Sep 28, 2010
I have dynamic html table , Now I want to find the items in the first column. The column name(td) is chk. How can do this using Jquery ?
View 2 Replies
View Related
Jan 24, 2011
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
[code]....
View 2 Replies
View Related
Apr 26, 2010
I have multiple ul with multiple actions on 'button' changes, i.e.:
<ul>
<li></li>
<li></li>
<li></li>
<li></li> <--this is to be hidden
</ul>
[Code]...
The UL's are to show top 3 items let's say, and hide the rest. When items are hidden on page load [top 3], the Show button is on. When that is clicked, it shows all LI's for that UL and button/link text changes to Hide, and hides all other items of all other items of other UL's apart from their top 3 items.
When the items show, and the text/image is changed to Hide, hide's on click should also hide that UL's items and only show three items for that UL. 3 items are always shown.
View 24 Replies
View Related
Apr 23, 2009
Can we create menu items, sub menu items using javascript coding.
View 2 Replies
View Related
Jul 7, 2010
Trying to get data from xml file. Got it. Trying add data in class.
$(this).find('Category').each(function(){
var menuItem = ($(this).find('Label:first').text())
$(".DfMenu").text(menuItem)
alert(menuItem)
There are 4 menu item. Alert shows up right but it add same data in all menus one by one. How can I add four different menu item in four divs that is using the same class.
View 2 Replies
View Related
Sep 15, 2009
For some reason my loadFirstPage in the following code is unable to find the dynamically created list items built up in the buildGallery function. I have a button in the extended code that calls the loadFirstPage function on a click which works perfectly when I click it
var buildNavi = function(){
var naviTemplate ='<li class="prev"><a href="#" title="Previous">Previous</a>
</li><li><span class="current"></span><span class="total">
[code]....
View 4 Replies
View Related
Apr 30, 2010
I am having quite a bit of trouble getting items out of a json encoded array. I have searched this forum tirelessly and can't find anything except more confusion. I'm simply trying to retrieve data from a mysql db via ajax.
select.php:
echo $json_encode_data;
output is like so:
{
[Code]....
Do you need to use a .json file when using .getJSON? I simply want to print data from my select.php file that has an json encoded array. If there is a more simple way to do this without using json encode
View 13 Replies
View Related
Feb 11, 2011
I want to compare the total number of checkboxes with the number of checked checkboxes of a certain nameI use these 2 functions:
alert($('input[name=checkItem]').length); // To get the total count
alert($('input[name=checkItem]:selected').length); //To get the total selected count
The first one works, the second one doesn't.
View 1 Replies
View Related
Sep 27, 2010
I wish to create a slideshow of items in a list.
The list should display 5 slides in a set of 10 items in the list.
The cycle behaviour I wish to have, is to put an element on top of the list and hide the element on the bottom.
I try using cycle plugin, how to left more than 1 element visible after slide cycle change.
View 1 Replies
View Related
Jun 16, 2009
I've been trying to work this out for a bit now but seem to have come a bit unstuck. I'd like to be able to use .find to search an <UL> element and find out if there are any items with two attributes the same as a search choice. i.e. : My UL looks like this :
<ul>
<li id="1" typeref="E" typeid="1">Element 1</li>
<li id="2" typeref="E" typeid="2">Element 2</li>
</ul>
I would like to do a search of the above UL and get back the id of the first LI element you can see in the list there by doing a search for typeref="E" && typeid="1". Is that possible using Jquery?
View 2 Replies
View Related
Jun 13, 2009
Here is the jCarousel lite page : [URL] And here is my project : [URL] Carousel pager works great, when you click a page, carousel switch to the chosen page. But if you try to drag an item outside the carousel (green border), the item won't go above the carousel border, but underneath.
View 4 Replies
View Related
Aug 4, 2010
I want to make a for loop with jQuery to reduce code, but it wouldn't work. This is the sorth of thing I want to do: run through an array of <li> and animate them separately with a pause in between.
$(
'#thebutton'
)
.click
[Code].....
View 2 Replies
View Related
Jun 8, 2009
Has anyone been successful in appending new items to the jQuery UI accordion widget? I'm trying all sorts of things, but however I manipulate the items in the accordion (like applying effects, or appending elements), it stops being an accordion. In case of appending, the new items do not act like part of the accordion. Issuing `.accordion()` on the parent after appending does not reactivate the accordion, etc.
View 2 Replies
View Related
Nov 9, 2010
I have a table containing multiple rows (tr), each row has two columns (td). In the first columnIhave acheckbox, when this checkbox is clicked i need it to change the class of a div in the second column of the row.
[Code]...
View 2 Replies
View Related