help with toggle
i am having problems with toggle it works but not the way i wanted is that a way to make works only on ul click when i click on li works as well but i only want on the ul thanks for the help and sorry for the bad english $(function(){ $('.b').hide(); $('.a').click(function(){ $(this).find('.b').next().toggle('fast'); }); }); <ul class='a'>test <li class='b'>a</li> <li class='b'>b</li> <li class='b'>c</li> </ul>
how not to run plugins in ie
Hi, How do you stop certain plugins from running in certain versions of ie? I'm using plugins that work great in modern browsers but are really slow in ie. Which will make for a bad user experience. So I'm thinking of just stripping my website down for ie users because if they are themselves not dynamic enough to update to a decent browser then they don't deserve dynamic website experiences! I use ie conditional statements for stylesheets but unsure how to implemement this to not run scripts. I looked
different event to different tags
hey all let us supposes I have 2 <p> tags and I want to associate an event at click for each how do I differentiate? same question if i have 2-3 pics and i want to associate an event when i click at each? Thank you very much in advance
Why HIERARCHY_REQUEST_ERROR when adding div to div on IE
I posted this question on stackoverflow, but have yet to receive any replies. I'm trying to use .get() and .append() to dynamically load a <div> from a relative URL, but when I do so on IE, I get a HIERARCHY_REQUEST_ERROR (3). It works fine on Firefox 4. I feel like what I'm attempting is fundamental and basic, and I don't know what I'm doing wrong. What is it about my request that the .append() creates an invalid hierarchy? How can I work around the error such that I can load the remote div into
Loading Jquery using window.document.write()
Hi everyone I have this button on a page that uses "window.open" and then "document.write" to open a new browser window and then write HTML to the newly opened window. The issue is that the written HTML has <script src> tag that loads Jquery. Around the bottom of the document is the <script> $(function(){....})</script> code. But the page gives an error at the call saying that "$" is undefined. Obviously, the JQuery library was not loaded. Any help? Abhay
setting input value problem
i have two text inputs Arrival <br><input id='datepicker1' type='text' value='04/24/2011' name='start_date'><br><br> Departure: <br><input id='datepicker2' type='text' value='04/24/2011' name='end_date'>I'm trying to set the value of #datepicker2 to #datepicker1's value on blur. This is the code i have but does absolutely nothing. <script> $("#datepicker1").bind('blur', function (){ var date = $("#datepicker1").val(); $("#datepicker2").val(date); });
How to set a DIV fullscreen?
Hello, Can you set a <div id="box"></div> fullscreen after click() with jQuery? With fullscreen I mean that the browser fits just in the screen of the client AND the box with image as background just fits in the browser. Or even better (but probably not possible) the same effect like when you click F11 ... Sometimes I see advertising (more like popups) of poker where the popup exactly fits the screen, so I guess my goal will also be possible. Who can help me with this or give me some directions?
Fade In Css Background-Image only
I'm making a landing page and wanted to fade a css background image (actually 2 of that part of my divs) <body> <div id="outer_wrapper"> <div id="inner_wrapper"> <div class="content_info"></div> </div> </div> separate css file contains the following div#outer_wrapper {background:transparent url(sitename.com/image.jpg) bottom left no-repeat; } div#inner_wrapper {background:transparent url(sitename.com/image.jpg) bottom left no-repeat; } I couldn't find an exact example or of a way to do this.
Jquery relative url to WCF REST Service hosted in IIS
I have created a WCF REST style service in my project. In development I am able to specify the relative url to access my service, jQuery.ajax({ url: "/WebServices/AddressWebService.svc/GetCountry", datatype: "json", success: function (data) { jQuery.each(data.GetCountryResult, function (index, value) { //value.entityData.CountryGuid //value.entityData.CountryName $('#dataCountry').empty();
Infinite AJAX loop
I have a simple function that performs an AJAX call to a PHP function that returns some html. var getSizes = function(sel, fid, use) { $.ajax({ type: 'POST', url: 'quote/getsizes/'+fid+'/'+use, dataType: 'text', success: function(opts) { $(opts).appendTo(sel); } }); I am currently only calling this function one time in one place but that it goes into an infinite loop appending data forever. Can
Firebug shows error jQuery "attempt to run compile-and-go script on a cleared scope"
Using FF4 I keep getting the above mentioned message... Whats is this supposed to mean??? The scripts seem to work correctly, nevertheless.
Another step in making my large slider
Ok, I posted before and got some good direction to move in but again I am stuck. I have an image slider that is made up of images from the wordpress gallery function (i am SOO much better at PHP than javascript). I have the output of the gallery to be like this: <div> <ul> <li>image</li> <li>image</li> <li>image</li> <li>image</li> </ul> </div>The div is supposed to work as a window where the overflow is hidden but I have it set to be 100% of the browser width. The goal is to slide through the images
How to make multiple items blink that are not yet in the DOM
I have a function called blink: function blink(strObject) { $(strObject).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100); }; I load a lot of new HTML into the DOM with the LOAD function, and then I want some of the DIVs in it to blink on and off for almost a second. I could do the following: $("DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand").each(function() { blink(this); }) but it would not work on content loaded via the DOM unless I mix it
Question about .height()
Shouldn't these return the same thing? DOM height theImage.get(0).height 164 jQuery height theImage.height() 0 Here is what the image refers to (actually a much smaller image for brevity) theImage [ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAGCAYAAAARx7TFAAAAPklEQVQIHWP8//8/AyHAREgBSJ4FpoiRkVEIyM4HYmuo2FGgLfVgNsg6qJWFQAGQ3XAMk2OEKoBqxk4R5SYAraobZjXAhjEAAAAASUVORK5CYII=">]
Media plugin difficulties
Hi all, I'm trying to get the media plugin to work on my server. I've stripped down the demo code and the player doesn't show. I've tried different version of the js and have the latest version downloaded to my server. I even added the document ready to make sure nothing was hanging. I'm sure I've done something really stupid, but I want to understand how to use this plugin properly. Any thoughts would be appreciated. Thanks Jay Here is a copy of my stripped down code. <!DOCTYPE
JQuery slideshow tripping up
Hi I've created a jquery canvas slideshow to apply image filter while running the slideshow, everything seems working fine but when I apply filter to the image, slideshow does'nt load other slides and keep loading the same slide. to have a look at the problem click the link pls: http://mi-linux.wlv.ac.uk/~0819487/MySlider/mySlider.html Any help you guys could give would be appreciated. Regards
Usin ajax get ...
Perhaps a very silly beginner question; i´ve gone thru a few exaples of the 'hello world' equivalent for ajax; the classic example having main.html with div id="main_panel", then having ON THE SAME folder of the main.html file, the few files for getting via ajax and then render it´s content inside div id=main_panel and so on, happy with that; my question is: All of those examples, always get those 'few files', lets say, one.html, two.html, and so, in the same folder where main.html resides; I want
How to navigate from usercontrol to webform using jquery ajax?
Hello Dears The autocomplete Code that is related to dropdownlist which is inside an usercontrol , passing the parameters to a webService. through jquery ajax was impossible .so we had to call webservice using namespace, but under som condition it failed so we were forced to use webservice instead of webform but the below code failed too: $.ajax({ type: "GET", url: "/pages/ClientChangeManager.aspx", dataType: "json", data: "{}", contentType: "application/json;
Amateur Night
Not sure if this is the right place to ask, but I currently have these two events (?) in numerous links within a page... onclick="NewWindow(this.href,'rank','350','140','yes','center');return false" onfocus="this.blur()"It works fine, but it is repetitive, it is in numerous links. It seems bulky and I don't like it. I think I have two questions. 1 - Can/how do I do the above events with JQ? 2 - How do I run the script in the doc head so each link can reference it, instead of bulking my code by having
JQuery's WYSIWYG ... Please, need advice.
Hello, I am looking for a lightweight WYSIWYG editor based on JQuery if possible. Is the one of this forums available anywhere? And what other options do I have? I would like something lightweight and customizable (with CSS) both in appearance and functionality. By looking at this forum's WYSIWYG the only new features I would need would be: 1. See the Html code and edit it in a popup window; 2. Define a Header tag; 3. Localized. 4. And maybe maximize it. I have been using TinyMCE. Is great but really
Typo in jQuery types documentation
Heya, I think I found a typo in the documentation at: http://docs.jquery.com/Types I think the boolean example code meant to have quotes around the second last "false" !"" // true
!"hello" // false
!"true" // false
!new Boolean(false) // false (sorry in advance if this post is made to the wrong forum, I wasn't sure which was the best for a post on the documentation)
JQuery slidehow moving forward to the first pic
Hi there, I've just finished another slideshow, but is there a possibility to make a slidehow go to the fist DIV without sliding back. It should be way better when it appears to slide forward just as the other animations. Many thanks, Jelmer
click on a div
Have a small problem. I'm set jquery to respond to clicks in all div .. like this: $(document).ready(function() { $("div").click(function() { alert("klikk"); }); }); So do I have a html that says something like this: <div style="width: 200px; height: 200px; border: 1px solid #000" id="forste"> <div style="width: 200px; height: 200px; border: 1px solid #000" class="andre"> <div style="width: 200px;
How should I select this?
So I have a script that grabs data from an xml doc, and for every result it makes this tree whole header title social body graph etc... clicking on the 'title' would show/hide the body. Up until today the 'social' would be was under 'body', but tooday i moved it to 'header'. Previously I would select the body of each element use .next(), but now it selects social...I was wondering if there is some selector that I can use that will target
JOOT
Hi all. jQuery is the N1 library for te DOM and Ajax. And I like it a lot. But it has not any tools to compensate for the lack of some OOP mechanism in JavaScript, like classes and inheritance. For that and some other reasons I have developed a small JavaScipt library - JOOT. JOOT provides convenient and simple API designed for sole purpose: to simplify creation of the object-oriented code. I found it very effective to use jQuery in conjunction with JOOT. This combination allows to build high
doubt
Hello I have a doubt with jQuery, I have a virtual store and the codes that DUIs are: <! - include jQuery library -> <script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> </ script> <! - include Cycle plugin -> <script type="text/javascript"src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"> </ script> <script type="text/javascript"> Where I can not mucar the http:// to https: / / to use my SSL. Can someone help me, I'll
Problems with posting data to MySQL db
Hello. My name is Andreas otherwise online I'm Didair. But that nickname was already taken. So my problem is that when i press my submit button the site just refreshes. Here is my Jquery code: <script type='text/javascript' > $(document).ready(function(){ $("form#submit").submit(function() { var user = ($_GET["with"]); var textarea = $('#textarea').attr('value'); $.ajax({ type: "POST", url: "js/message.php?to="+
Cloning doubling up
I am trying to add a row of HTML to a div whenever a button is clicked. I am using the following code: $(function(){ $('#add-item').click(function(){ $('#item-to-add').clone().appendTo('#item-container'); }); });This works perfectly the first time the button is clicked. Unfortunately, subsequent clicks result in a doubling of rows added (e.g. 1, 2, 4, 8, etc.) which is definitely not what I need. I tried creating a variable of the clone outside of the click event like so: $(function(){
Getting some lag when applying e.preventDefault();
$(".change_page").click(function(e){ e.preventDefault(); do_stuff(); });I noticed when I click one of these links, there is an ever so slight lag on all browsers. Maybe less than half a second, but it's noticeable. Now, when I remove e.preventDefault() and use return false instead, everything runs a lot smoother. Any ideas? Thanks!
Switching link address to Hash value
Hi all, not sure if this is something simple, when I started I thought it was, but am having problems now so am asking for some help! I have a main menu at the top of each page of my site and on one single page a Coda Slider. To reach each different slide you need just #1. #2 etc from within the Coda page, but to get to it from a different location you need www.sitename/pagename/#1 Now I cant have both versions in the menu. So is there a way to add some script, just to the single Coda Slider page
Fade out function problem
Hi Dears, How I can make a fade Out function that works on three separated Div , it have to get the Id of Div as an argument , I tried to do that but it couldn't maintain the status of previous Div ,
enable/disable
I have an ASP page that has a master page. I have a drop down list and 2 text boxes. The change function is being executed and I get the text value of the selected list items, but the enable and disable are not working. I made the changes suggested by andrewgsw - no luck. HTML: <asp:DropDownList ID="ViewNameDropDownList" runat="server" Font-Bold="true" Font-Size = "Small" Width="230px" AutoPostBack ="True"> <asp:ListItem Text="View1" Value="1" runat="server"></asp:ListItem> <asp:ListItem Text="View2"
Using $(document).one("click", function) to close a drop-down when the user clicks on something else
Hi, I made a drop-down list that is opened when a user clicks on a button. If the user selects an item, the drop-down is rebuilt so the list is closed. If the user clicks on the button again, the drop-down closes using .toggle() on the button click event, and these two scenarios work great. However, I also need the drop-down to close when the user clicks anywhere outside of the drop-down. This seems simple, but I've been having a really difficult time figuring this out. I tried .focusout(),
Intercepting $.ajax.complete to capture responseText
How would I intercept responseText from the complete function of the ajax request ? Once I capture the responseText, I would the to return execution of rest of the lines in the original complete method
nextUntil with .each - can't figure it out...
Having some issues using nextUntil that I just can't figure out. So I have a table with a checkbox as the first cell. When the checkbox is clicked, it adds a class 'activated' to the parent tr, and also goes up to a designated header row (class='category') and adds 'activatedHead' class to that row. That all works. When a function is called, jQuery is supposed to grab each row with 'activatedHead' class, iterate through, grab each row that has class 'activated' under that 'activatedHead' row, UNTIL
New button
Hi all, At the moment I have developed a photography website for a client that has a gallery section. I have used jquery to add a feature where when an image in the gallery can be clicked on to view a larger version of that image. The expanded image contains two buttons near the top right and left which are 'Next' and 'Prev' respectively. The client has requested that I ad another button to the bottom right of the expanded image that says 'Buy' which will take the buyer to the shopping cart where
Questions related to Post/Get: Trying to pass querystring variables - problems with multiple calls.
Greetings, ---EDIT----------------------------- Can someone help me answer this question: Using TCPView, I see that browsers often make multiple connections to a website when the URL is requested. Could this be the reason why my VB.Net page is being called so many times from a single Post request? I'm guessing this wouldn't happen in local development mode because it isn't necessary. If this is in fact the culprit, how can I ensure that javascript only sends a single call to my VB.Net page?
Hidding UL after H2
I have a series of <h2>'s followed by <ul>'s, and I want to have clicking a link in the <h2>'s hide the following <ul>. Here's my approximate html: <h2><a href="#">Level 2 header</a></h2> <ul> <li>List item</li> <li>List item 2</li> <li>List item 3</li> </ul> <h2><a href="#">Another level 2 header</a></h2> <ul> <li>List item</li> <li>List item 2</li> <li>List item 3</li> </ul> And he's what I have in my custom.js: jQuery('.main h2 a').click(function() {
my ajax query doesn't work time to time!!!
Hello everyone ; I'm writing an application with PHP that let me have statitics about visited pages for my web site. to save informations needed i use an ajax query with the unload event. The problem that i have is titme to time the script uses with that ajax query doesn't work especially when i stay long time in a page. this is my code? <script type="text/javascript"> function closeIt() { $.ajax({ async: "false", url : "out.php", success : function(data) { } }); } $(function(){ $(window).bind('beforeunload
all descendants???
Is there no way with jQuery to iterate over all descendant elements (children, grandchildren, great-grandchildren etc)?
Next Page