Click inside div, but not on link
Hey all! I have tried searching everywhere for this. How can I make a function that tests if the user clicks within a div, but not on a button or link inside the same div? A click on a link or button should ignore the div click event. Thanks in advance!
Removing / Reseting z-index with jQuery
How do I reset the z-index which was set by css('z-index',value)? I tried css('z-index','auto') as well as css('z-index',null), both throw errors in IE7 and IE8...
checking for dynamic content - ajax()
Okay I have a blank html page with the following in the head: $(document).ready(function () { $.ajax({ url: 'include.html', success: function(data){ $('body').html(data); }}); if ($('#load').length) { alert('Hello'); } }); And a file called include.html with the following: <p id="load">Hello</p> The idea is to dynamically load the include (which is working fine) and then if it has loaded create an alert 'Hello' (which is not working). My question is why isn't this working? I appreciate that it's
Hiding and unhiding 2 forms with jQuery and DIV, possible?
Hi guys I am new to these forums and to jQuery, so please be nice to me. ;) I am in the progress of building a new website; the layout and stuff is already done for the most part, but I am having a problem with the two order forms on my website. Well not the forms themselves, more with how they appear (and disappear). Like stated I have 2 forms on my website. When coming to my website they should be hidden (standard). When someone wants to order they press the link for order form A or form B. From
If Else statements and the hover function
Hello, I was wondering if it is possible to check if an object is being hovered on via an if else statement and then do something if it is (if is on Hover true), or something if it is not (if is on Hover false). Here is some psuedo-code... so checking if the user is hovering over the div with the id "text" then the code will write the html paragraph telling what the user is doing in the paragraph with the id message if ("div#text").is(":hover"){ function () {
jQuery to store data for a session
I am trying to use jQuery AJAX. What my requirement is, i wish to load user names from DB in dataset, convert it to JSON format and store it in memory or using jQuery data for use while a user is browsing my site, i.e for a session. This way I can use autocomplete or my own code to display data to user. Can anyone help me design such a scenario?
Find a pdf element document in a web-page
I have a html page that loads another html page from another web application on the same server in a iFrame. I do not have any control of the html-code in this loaded page. But I know the loaded html contains a frame and somewhere in a frame it contains a pdf doc. How do I get a reference to ths pdf document to send it to a printer?
Jquery Popup
Hello Folks., I am looking for jquery script of popping up an image onmouseover.. i did this using javascript but it is not browser supportive.. so looking for jquery script.. Thanks
update initializing variables onclick and re-run the script...
.. well is it even possible and how could i do that?! i'll try to explain better: i run a carousel plugin which has initializing variables on my index page, which looks like: $(function() { $(".jMyCarousel").jMyCarousel({ visible: '100%', speed: 275, start: -2146, mouseWheel: false }); });now what i need is an onclick event which tells the script to update the variable 'start' to '500' and then re-run the script without a complete page-reloading.... any ideas please
My website is not working
Hi I used some jquery effects to create my website. The text slides to the right when it changes page. It is working fine in firefox and safari, but in internet explore it doesn't work. here is the url of the page on my website that doesn't work in internet explore: http://katieduck.com/Courses/Improvisation Winter Course Dartington.html Maybe you can see what is wrong, thank u, Ilaria
code run in FF but not IE
Hi guys, I've written this snippet about 8 months ago, since then I hardly touch jquery. The time I wrote it, it worked in both browsers but today I open it, dont know how come it doesn't work in IE anymore. Can you help me spot the problem please.. Opps for forgot to attach the code <!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"> <head> <style type="text/css"> .cat2, .cat1, .cat3
Problem with .toggle()??
Hi, here is my code: HTML: http://pastebin.com/Z2ArjHnS Javascript: http://pastebin.com/nF14Ewtf and CSS: http://pastebin.com/VnsRZxQs And the second toggle isn't work !!! In Firebug, i do not get error!! Tha a make wrong?? Thanks for your time!
.load() doesn't load in Chrome (OSX)
Hey guys, I'm loading an external html file in my script and placing it in some div I have. It works perfectly fine in FF & Safari, but Chrome doesn't give a damn about it. It loads the external file and I get a status "success", but the loaded data is just empty. Maybe jQuery has an issue with Chrome 5.0.342.9 beta on OSX ?
Show is using a transparent background instead of color I spesified.
I have a fairly standard menu, consisting of an unnumbered list. On mouseover on the first level of the menu, I want to show the second level, preferably using a nice animation. My first though was to use jquery.ui.show like this: $(this).find("ul.subnav").first().show('blind', '', 600); This works, but for some reason the animation sets the bakground to transparent so that the "dropdown" has white text on white background until the animation is done. At the end of the animation, the background is
Variable scope
I have researched this a bit ad I am sure the question has been asked often, but the behavior I am getting does not seem to jive with what I am reading. In my document head I have: <script type="text/javascript"> var DAbuttons = { "up" : "type=\"image\" src=\"/inc/DAbuttons/TopRowUp.gif\"", "down" : "type=\"image\" src=\"/inc/DAbuttons/BottomRowDown.gif\"", "update" : "type=\"image\" src=\"/inc/DAbuttons/UpdateRowOrder.gif\"" }; </script> and in my script $(document).ready (below the above code
Offset & Position Values Changing when Scrolled?
So what I'm trying to accomplish is a "sticky footer" for an active article within a list of articles. When the user is scrolling through the active article, the footer "sticks" to the bottom of the screen - until scrolling reaches the bottom of the article, at which point the footer sticks to the article's bottom. (Or top when scrolling up.) I had this all working (demo here), but then actually implemented it into our layout which uses a scrolling DIV container for all the articles, it breaks
Problem with module using jquery within module
Hi everybody, I'm working with module using jquery in joomla. And i have a problem, that is each module include jquery framework within that module by using function $document->addScript. So when having multi module using jquery, multi jquery'll included. So bug happen. I found multi module using jquery have same that bug. I spend 2 days to fix bug but i can't solve that problem. Anybody can help me? Thanks
Is there anyway for jQuery to detect an upload?
For example... Upon uploading a file, jQuery will display a div-overlay or something saying "Upload in progress", then when the upload is finished/form is done submitting, the div-overlay is removed... It would follow the concept of: {this is just mockup code} onUpload (#uploadform) { display(#divOverlay); } onComplete(#uploadform) { remove(#divOverlay); } Sorry if this is a stupid question. I'm a bit new to jQuery.
A plugin for touching devices (iPhone/Android) ?
Hi, You may have seen the newest Google Images for mobiles devices, it's incredibly fast and reactive. I tested several plugins for simulate the swipe, maybe it's smooth and clean on an iPhone (all of them seems to be created for this device), but on an Android Device, it's not so good. So I was looking for a plugins or something else to allow me to do something like that : $('body').bind({ touch: function() { // Do something }, swipeLeft: function() { // Do something
apply class to parent li in nestled order lists
I am following this article http://docs.jquery.com/Tutorials:Auto-Selecting_Navigation I am able to successfully add a class to the active page li menu item but does anyone know how to modify or add to this script so that any parent menu li items also get theactive class? I would like to avoid having to add ID's as the menu items will be changing alot My menus have three levels max here is my menu structure and code so far * Menu * <ul class="topLevel"> <li><a href="/home.html">one</a></li> <li><a
Display feed back
Hi I've managed to post a form in the background and I successfully get the return-data from the saving-page back. So far everything is fine. But when I click the check-box in the form more than once, I do not get the feedback again. Of course, because it's faded out. How do I delete the return-data and display the element again? Thanks in advance for your help. <script language="JavaScript" type="text/javascript"> $(document).ready(function(){ $("input").click(function(){
Sortable and Cookie Help, Desperate! :(
Hi, Having real trouble getting the jQuery Sortable UI to save it's positions into a cookie. Been following some great tutorials on the net but can't quite get it to work. The problem is clearly with the Javascript code below. Any help would make my year :) HTML code is at the bottom of this thread. <div id="example-1-4"> <div id="containment"> <div class="column left first"> <ul class="sortable-list"> <li
Basic Jquery Problem URGENT Help Appreciated.. Thank You.
Hello Guys Please help me with this jquery code.. simply i want to ask questions to user and according to option selected show a output.. The Code Is This: <div id="new"> <h2 id="h21">Select The Options:</h2> <h3 id="aa">A</h3> <h3 id="ab">B</h3> </div> <div id="buy1"> <ul> <li id="li1">A</li> <li id="li2">B</li> </ul> </div> <div id="buy2"> <ul> <li id="li4">D</li> <li id="li5">E</li> </ul> </div> <!-- Hiding DIVs Unused --> <script> $("#buy1").hide(0); $("#buy2").hide(0); </script> <!-- First Set
How to know, which form was clicked
Hi I'm quite new to this jQuery and I really love it, but I just can't get to solve this little problem. I have a page with several forms. Each form has a checkbox and some Id's behind it. I can click on a checkbox, and it triggers the submit and save in a DB and returns an Ok. This works fine. But I simply cannot find out, how to place the Ok next to the checkbox I clicked. How do I know, which form was clicked on? Here's the code so far: <script language="JavaScript" type="text/javascript"
List Filtered Content using Multiple Parameters
Hi All, I'm New to the JQuery.. What I want to do is Send Multiple Parameters to the Server and Get the Filtered contents from the Server to Show them on Auto COmplete List.. Ex: I have 3 Text Boxes, 1- Name, 2. City , 3. Country On Text Change of each and Every Text Box , I wanted to Display One Single List Filtered by those three Fields.. As per the Above case Where NAme=Something and Clty=Something and Country=something.. Problem is I need all of them in one list regardless of which text
Mouse over move away effect
Hey guys, I am trying to duplicate the effect that can be found at http://www.hubltd.com/ under the work link. And this is what I have so far http://figureadesign.com/dev/portfolio.htm. Not quite turning out the same way. So this is what I have http://pastebin.com/jpBjTjy9 (not the same code at the link above): I start out by getting the top, left, bottom and right coordinates of each image lines 38 - 49 On mouse enter of each image I grab all the sibling images and put all the images the are to
Problems using horizontal menu "lavalamp" and dock menu css
These codes worked fine in IE when they are separated, but when they are togheter lavalamp don´t work (Javascript). In addition, the declaration of the scripts should go in this order but the dock does not apply. What could be? that is what is wrong? Thank you very much. This is lavalamp link : http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/ This is css dock menu: http://www.ndesign-studio.com/blog/design/css-dock-menu This ir de order: <script type="text/javascript" src="javascript/jquery-1.2.3.min.js"></script>
psuedo-accordion?
I'm trying to get this to work sort of like an accordion menu, i wrote it all from scratch so there is probably a lot of bad practices, just as a disclaimer. I would like to only show one div at a time, so when I click one it closes all the others. I've no idea how to do this without what seems to be an extraneous amount of code. its already pretty bulky. here is what I have so far (its same code for each div): its also available here for XHTML reference http://www.addhavoc.com/services.html $(document).ready(function(){
Using not()
Obviously I'm not quite understanding .not() because the following code does not perform identically: if(!$(this).is('.current')) { some code } and if($(this).not('.current')) { some code } So that I can make use of .not(), how would I write the second conditional so that it performs as the first conditional? Thanks.
problem with div
Hi everybody... i am new in jQuery.... and i have a problem.... let me first show you my code.... ----------------------------------------- <style type="text/css"> <!-- #content { background-color: #FFFFCC; width:500px; height: 500px; } #box { background-color: #66FF66; height: 50px; width: 200px; } --> </style> <script type="text/javascript" src="../../../apache2triad/htdocs/ATOL_EMS/deneme/Script/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){
jQuery and mySql index don't match
I have a problem with index-ing. In jQuery it's zero based, in mySql it starts with 1. It's probably impossible to make mysql index from 0, so I have to fix it in the jQuery code, which folllows: $(document).ready(function(){ $("#tekst a").click(function() { var index = $('#tekst a').index(this); var klik = $('#glosy p:eq(' + index + ')').html().replace('(','').replace(')',''); var addklik = ++klik; $.ajax({ type: "POST", url: "ajax2.php",
Hide a single div within another div
jQuery Noob here. The following hides all divs. What if I want to hide only one div? Specifically the one with the word TEXT. <div > <div id="hide">TEXT</div> <input type="button" value="Hide" /> </div> With this in the header: $(document).ready(function(){ $("button").click(function(event){ $("#hide").hide("slow"); }); }); if I change #hide to div then it hides all the divs, which is not what I want. Any help is greatly appreciated.
Slide Down like mootools
This is going to be hard to describe.. however... When you use Mootools slide down, the div seems to slidedown with the content fixed to the div that is sliding... however slideDown with jquery seems to simply reveal the div... is there a way to simulate the mootools effect... regards to any responders.
get encoded JSON items
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: { "0":"108","id":"108", "1":"2010-03-09 17:12:43","date_submitted":"2010-03-09 17:12:43", "2":"1","event_desc":"1", "3":"2010-03-09","event_date":"2010-03-09" } index.php: $.getJSON("select.php", function(data) { $.each(data.results,
cross domain uploading of images
i've tried many different methods of uploading my form data to another domain.. also with getJSON which works until you add images. I have also tried the AjaxSubmit plugin and ajaxupload all with their own problems. basically I haven't found a solution to do this yet. can anyone guide me here... perhaps with an example... regards, Peter
Scalable Photo Gallery
Hello, I created my previous portfolio site entirely in AS3. You can see it here http://www.ryanwhittierhale.com/. I've decided to ditch Flash and remake my site using jQuery. Right now I have a mock up, but I'm running into problems with the scalable photo gallery. So far it scales correctly, but I can't figure out how to create a click through gallery. Ideally I would like to add Next and Previous buttons on the page to navigate the gallery. Is there some way I could do something like?? <img src=
Tooltip flickers when you hover over list item.
I have this tooltip that shows up when you enter a list item with your mouse. The tooltip is partly placed on top of the list item, so it makes sense that if you move your mouse off the list and onto the tooltip itself the tooltip dissapears. It actually starts to flicker because when the tooltip is gone, your mouse placed on the list item and the tooltip shows up again which ends up in a loop. I understand why it flickers, but I don't really know how to prevent that from happening. The script I
$.animate with one value depending on the other
Hi everyone, i want to make an animation where one value depends on the other. Let's say i want to animate both the 'top' and 'marginTop' properties, where i want the marginTop property to use the current value of the 'top' property. I could do something like this: $("#foo").animate({ top : "100px", marginTop : ($("#foo").css('top') * 2) + 'px' }); But that doesn't work, i guess because the css('top') method only gets called after the animation has finished. Is there a trick to get
validate one field depending on another field value
Hi All, I am new in jquery and learning it.I am going to make a form validation where if the radio button is checked then the form validation will take place in particular one field ie file field and all other fields will be validated normally. Here is my code: $(document).ready(function () { //validate form $("form[name='rgt_form']").validate({ debug: false, rules: {
Jquery stopped working once I added another jquery accordian
http://www.norrislikens.com/curtis1000/ I have a tool tip on the bottom right pictures. I added the slidedeck accordian...now only the accordian works..not the tooltip. Im a newbie.....Im sure there is a way to combine the code...etc. Can anyone help?
Next Page