Help with some toggle() logic
Hey guys just wondering if you can help me out real quick. I have some buttons. Each button toggles the display of their assigned div. My question is if a div is already up and they click another button, I want to hide the current div and still show the div they clicked on. I got close to what I needed but it wasn't working. This is the function I use in the onclick for each button function toggleWindow(who) { targetWindow = document.getElementById(who.rel); $(targetWindow).toggle('drop',
Sliding menu(carousal) with mac effect
Hi, I am trying to create a menu ribbon which has images and can be moved left and right with arrows(carousal kind) and also the images zoom when focussed upon(mac effect). Also the elements in the menu can be dragged and repositioned as per users convinience. Can somebody help me create such a menu?
I am willing to pay to get slider working on site, please help.
Hi I'm basically trying to have 2 types of js slider on a web page together, but just seem to conflict. I've had members try and help but either I don't get what they are saying or they don't know the answer either. Please see. http://www.webdesignerforum.co.uk/topic/38167-follow-up-about-sliderscroller-javascript-issue/ Anyway if you visit http://www.acknowledgedtest.info/home-slider.html you will hopefully see the problem. The top slider/animation needs to stay the same and I need a slider, whether
jquery many toggle buttons.
Hello, i have some numbers that user can select from 1,2,3,4, ... 60. i want to present this numbers as a toggle button each that user can selelect and unselect. Also i need this number to be in the same group so that i know which numbers have the user selected and in order to continue must select up to 10 numbers. Can anybody help on this? i am new in jquery. Thanks
Big Problem !!!
Hi I just installed Fancybox on my asp project, works fine but in my visual studio 2008 I receive this warning: "Warning 12 Error updating JScript IntelliSense: c:inetpubwwwroot PerusssEnFancyboxjquery-1.4.2.min.js: Object doesn't support this property or method @ 33:0 c:inetpubwwwrootPerusssEnSoporte.aspx" When I run the project works fine but when I close the frame I use with pictures or videos... I see errors in my internet explorer: -----------------------------------------------------------------------------------
Using tew JQUERY - Image Zoom Effect and Slider
HI, I was given a task to implement two JQUERY to get Image Zoom Effect and Images Slider, the two ideas are given below: Image Zoom: http://booyant.com/ Images Slider: http://www.brain-space.de/ I was able to get the Images Slider but what ever I do can't get both the JQUERY on one thing. Please help me in this matter. Thank you Best Regards, mnightwalker
Small problem. Easy Solution!
I am trying to change the colSpan of every td element to 3. Why doesn't this work? This is just a part of my code; I know this would be useless alone. Here is my code: <script> $(document).ready(function() { $('td').attr('colSpan',3); }) </script>
Could use some help with changing a forms target attribute from select list
Hi, I have a form that I need to target either _blank or _self depending on a selection made in a select list. Does anyone have any idea the best way to go about this? Thanks Daniel
Image duplicating
I'm having this problem with a lightbox type function when I click images on my website. I'm not using the lightbox plugin, but a similar script I found on a blog [i'd source it but can't find it at the moment]. What's happening is that [seemingly random] it will display two instances of the image when I only single click on it. Code: $(".enlarge").bind("click", function(){ $("#display > img").each(function(){ $(this).remove(); }); $("#display").show();
How to pass (function with parameter) as parameter?
<a onclick="test('abc')">test</a> var fun1 = function( param ){ // do something } var test = function( text ){ $('.element').click( fun1(text) ); } I had this code, but browser will call fun1(text) directly instead of hold on and wait until user clicks on the link. Is there any solution to this? I do understand the issue is browser treat line 7 fun1 as a function call, not as a parameter. Thanks.
Cufon problem with height of <li> with children <ul>
Without using Cufon the height is perfect. With Cufon it is to high... What i have to change in css code or where what?
What's the difference between (function($) { /* code */ })(jQuery); and $(document).ready(function(){ /* code */ }); ?
(function($) { /* code*/ })(jQuery); $(document).ready(function(){ /* code */ }); I know that document.read is loaded when html page is been loaded. But what's the difference between the two? Thanks.
excluding an element
I am trying to select (and then clone) an entire DOM structure excluding one div. The DOM is stored in a variable like this: var original = $(this).closest("table.mainContainer"); The I try to exclude the div in the clone like this $(original).find(":not(div.container)").clone(); But the div is shows in the clone. Any ideas on what I'm doing wrong? Thanks in advance for your help.
table tbody tr:even with nested tables.
Hi there! So, I'm trying to do alternate row backgrounds, which is simple: $("table tbody tr:even").addClass("even");The issue I am running into is that I have another table nested inside each row. The parent table gets the 'even' class added to the correct rows, but every row inside the nested table gets the "even" class as well. So, this is what is happening: <table> <tbody> <tr class="even"> <td> <table> <tbody> <tr class="even"> <td></td>
Using .live() with .each()
Hello all, I have a function that I apply to every anchor tag in a div called listnav. I do so like this: $('.listnav a').each(function(i, el) { $(el).click(function(ev) { ev.preventDefault(); var href = $(this).attr('href'); $('.listnav a').removeClass('hit'); $(this).addClass('hit'); load(href); }); });This,among other things, causes a function called load to be called on the
how to use variables while using css classes?
I want to use variable names while accessing css classes. Here I am giving example about my query function ab(temp){ var spc = "horizontal"+temp; $("#spc .cssClass").css("left","20px"); } variable temp will change dynamically. as per temp we need to acces horzontal1 or horizontal2 divs. im new to jquery. please suggest me
How do I launch datepicker from a textbox based on the drop down item chosen?
I am working in ASP.NET 4.0 and use IE8, Firefox and Chrome for testing. Inside the web page I have a textbox and a drop down with 5 items. If the 4th item is chosen I want the textbox to become a datepicker. Here is my best attempt thus far. Any help or advice is greatly appreciated. $(document).ready(function () { $("#txtSearch").focus(function () { if ($("#ddlSearch").attr("selectedindex") == 4) { $("#txtSearch").datepick("enable"); } else { $("#txtSearch").datepick("disable") } }); }); <link
J4D slider and lightbox
Hi, I am using the following slider on my website from J4D, the images within my slider use lightbox however they seem to interfere with one another and only 1 will work at a time (which ever is referenced lowest in the <head> tags). http://jqueryfordesigners.com/slider-gallery/ I am no JS/JQuery expert and would really appreciate some help on how to fix this one! Thanks, Zoe
Events defined in $.each (creating list elements with events) not executing
Hello, I am trying to "ajaxify" my site. Now I have one problem: $("#posts").children().remove(); $("#tag-sidebar").children().remove(); $.each(data.Tags_Sidebar, function (indexInArray, valueOfElement) { var insert = $("<li>"); insert.addClass(valueOfElement.Type); var href1 = $("<a>"); href1.attr("href", "#"); href1.bind("click", {valuee: valueOfElement }, function(event) { //document.location =
jQuery Ajax, overwrite onreadystatechange handler
Hi Folks, I'm recently fooling around with some ajax polling techniques. However, it seems like I can't overwrite the onreadystatechange handler from a `XMLHttpRequest` object in FireFox (3.6.7). On tracking the problem why FF throws an exception when trying to access `onreadystatechange`, I realized it depends whether the `send()` method was called or not. In other words, here is an example (plain js, no jQuery so far), that works: (This is fairly simplified just for a demonstration) var myxhr
Alternative to animate({marginLeft
Hi, I have a number of list items that are populated with news stories and I want the user to be able to scroll left and right through the news stories. Scrolling left works fine with the following code: Note .prev is the class for left button $('.prev').click(function(){ $('li.rssRow:first').animate( {marginLeft: '-300px'}, 1000, function() { $('li.rssRow:first').detach().appendTo('.rssBody ul').removeAttr('style'); }); }); The first item in the list scrolls off the screen and is detached from the
same th and td widths in different tables
Hello, Ia have two different tables that are generated from an application. In the first one there are only <th> and the second one only <td> I want the size of the first, second etc <td> to be equal to the corresponding <th> I have managed to do that by putting ids in all of them and then make a function like: $(function(){ takeHeight1 = $("#th1").width(); $("#td1").width(takeHeight1); takeHeight2 = $("#th2").width(); $("#td2").width(takeHeight2);
newbie question, calling jquery function from .js file
I have a jquery plugin for an image gallery, and i'm trying to tweak it to be able to change the shown image via a drop down menu. In the .js file I have this working function: changeimage: function (){ alert(1); gallery.gotoIndex(1, false, true); return true; }, My issue is, how do I call this from within my html file? I've moved the function into my html header and called it succesfully.. but only the alert occurs... The problem seems to be that once
$.load issues with webkit.
Here's my scenario. I've created a PHP that will download files from a remote FTP server, and when you click the link starts navigating to that page which will let you download. Now this may take a LONG time, so I create a dialog that uses $.load() to run a script every three seconds to check the % of the file that's downloaded. This works fine in Firefox and IE, but when Webkit's navigating, any kind of Ajax query fails. Does anybody have any idea on how to overcome this?
while-loop Jquery working only once
Dear Jquery user, I have a question. I have while loop, where something is defined via ID, I called it pin_click. So of course there are a few entries. And I have the following Code: $('#pin_click').button() .click(function() { var ID = $('#entrie_id').val(); $.ajax({ url: 'changepin.php', type: 'POST', data: 'ID=' + ID, success: function(result) {
Sending multidimensional array via $.post
Hallo! thanks for your time; I'm having troubles with sending array via $.post (it sends just keys) my code: $('#send1').click(function() { var my = []; for (i=0; i<2; i++) { my[i] = []; my[i]['name'] = 'liza'+i; my[i]['age'] = '43'+i; my[i]['options'] = 'none'+i; } $.post("http://field.in.ua/index.php/welcome/data", { 'choices[]': my }, function(data){ alert(data);}); });
.hover() - keep the new div showing if mouse is over it
The state my code is in, i can only set a timeout for the div to dissapear, but i want it to stick till it loses focus. $(document).ready(function(){ var img = $("#myPic"); var pos = img.position(); img.hover(function(){$("#floatdiv").show(1000); $('#floatdiv').css({'top' : pos.top + 25 + 'px', 'left' : pos.left + 25 + 'px'}); },function(){ setTimeout(function() { $('#floatdiv').hide('fast'); }, 3000); }); });
can the jquery range slider have descriptions within slider panel
can the jquery range slider have descriptions within slider panel as in the example below(it is in dojo) http://tobias.klpstn.com/dojo1.1/dojox/form/tests/test_RangeSlider.html
Using .append() method, but page won't Validate
On my portfolio site, I use the .append() method quite a bit, but I'm running into a problem with Validation. for example: the jQuery... $("#emptyDIV").append('<p>Stuff to append</p>');and the html <body> <div id="emptyDIV"></div> </body> But the validator is coming back saying that I can't use either the < > or p tags and my page won't validate. I've tried using the < and > alternative, but then the p tag isn't honored when appended to the #emptyDIV http://www.clintmilner.com is my page, and
Echo directories and load images dynamically for an image gallery
Please forgive me if I'm posting on the wrong forum for this is my first post here. I designed a portfolio for a client in which she can display her work. Most of my clients are looking for easy editable portfolios. So I decided to use a combination of the galleria plugin and CMS editing. The gallery is working fine and everything was doing ok until she told me she needed several galleries inside her portfolio. So when she wanted to make a new gallery collection, she would have to create a new file,
val() of Input in div
Dear Jquery Users, I have a question. I have a while loop like this e.g. <div id="commentbox"> <?php echo $code; ?> <input type="hidden" value="<?php echo $id; ?> <a href="#" id="clicktodo">Show Comment</a> </div>So this is being repeated 8 times and everytime the id in the hidden input changes. My question is, how can I tell JQuery to access the input which is in the div, as the clicked <a>. So to make it clear: When I click at the <a> in the 6th commentbox div, I want Jquery to
clone()d object persistence
Hello, I am curious about the lifetime of, say a clone()d <div>. Just playing around, watching my DOM with Firebug, I see a cloned <div> disappear when I hide() it. Is this normal? In this case, this is exactly what I want (for it to get destroyed), but say if I wanted the clone to remain persistent, but I did want to hide() it temporarily? Is there a way to keep it around? What's more confusing to me is if I create more than one clone asynchronously (when an .ajax() call is made) and hide() each
UI buttons... incorrect hover class- is it a bug?
I have some buttons and 3 out of the 4 work totally fine. The fourth however has a strange behavior where the hover class doesn't get properly added.. and as such doesn't always hover correctly (color change.. and the pointer cursor are wrong). and w/ firebug open i can see the correct class "ui-state-hover" get added to the working buttons and only some of the time to the broken button. instead i will often just see "hover" as the class, which then doesn't work w/ the UI theme. $('.upload_img').button({
Convert jQuery Object ( eg $('p').eq(1) ) to its text equivalent eg "$('p').eq(1)" ?
I have a jQuery object $('p').eq(1) and I would like to display its text equivalent '$('p').eq(1)' in an alert box ie I want the alert box to display $('p').eq(1). The alert box only displays [object Object] (as you might expect). I have used String() (and many others) but this does not work. If this cannot be done, is it possible to do the opposite ie to convert the string "$('p').eq(1)" to the jQuery object $('p').eq(1) ? Thank you This is my code <html> <head> <title>object to text</title> <script
combining a timeline with drag'n'drop events
Hi, my first post, hopefully this is the right place, otherwise please point me to it. Here it goes: I want to develop a page where I have a timeline that would have a play/pause button and when it plays I'd like other items to move from one zone to another, based on events in the timeline. Imagine for example countries becoming members of the united nations or something like this, where you have one (non-UN) zone of country names that move to another (members) zone. For this I wonder if jquery's
Wordpress/jquery Issue
Im playing around on a test site & server...im new to jquery and javascript at the same time. Ive made progress in the last 3 days since ive started. Im using wordpress. All of the js code is in the header.php. Have things working perfectly on this page which is the index (blog) page. http://www.truwebdesign.com/test/ Now when i make a page template and make a page, heres what i get. http://www.truwebdesign.com/test/portfolio As you can see none of the js loading on the second link. What am i doing
Use regex to match a value in form input
I'm trying to create a branching form wherein the user selects a date using the datepicker plugin, then, depending on whether they choose a weekday or a Saturday, they are presented with one or the other of 2 select lists to choose the time. I'm just getting started, and I can't seem to get the regex right. Here's a simplifed version of the relevant part of the datepicker, $(function() { $(".datepicker").datepicker({dateFormat: 'D, mm-dd-yy',buttonText: 'Click Me!', }); }); and here's the initial
Programming Style for JQuery (javascript) functionality with database user settings
Not sure where else to put this. Using jQuery with my coding now and converting much of the plain JavaScript code over. Would like to know what suggestions people have on organizing or controlling jQuery functions and changes it makes to a site based on a member's custom settings from a database pull? Programming through PHP, and right now I pull the user account from the database, along with their custom page settings (icons they want, colors, page changes, etc) and display to the page through
superfish menu question for joomla - flyouts going upwards.
is it possible for my sublinks on my superfish menu module for joomla to flyout 'upwards' instead of down, bit silly i know but its suits my layout. any help would be great
animation doesn't run correctly first time
hi guys, it's obvious that i cant do a script by my own..i'm sorry about that this time the problem is that in this composition of animation: neticom.omnigrafica.it when you want to change the displayed category, the first time, the animation of the title is exactly the opposite that should be performed!! somebody has an idea of what causes this anomaly? here's the code $(function() { $('#n_isp').click(function() { showSection('isp', '1'); }); $('#n_video').click(function() {
Next Page