trouble binding custom events
Hi, I have a jqueryui dialog box which opens, and has a treeview control inside it. this control is rich with ajax calls, and thus makes use of live events on selectors. However I noticed, if I close the dialog and reopen it, events start duplicating, and triplicating if closed/opened a third time. So I decided I need to dispose of the live events when the dialog box is closed. In my dialog close function, I put the following: $("body").toggle("destroytreeview"); and in my treeview initialising I
JQuery step duration
Hi, I would like to ask if there is a way to define the jquery step duration (eg when you have an animation). For example, is there any way to define that an animation from left:0px to left:500px in 50000ms will be completed in five steps (dt of step= 10000). Thanks
jQuery ajax second load stops tinymce
We have a page that allows a user to load a form over ajax using jQuery 1.3.2. The form contains a simple table layout, some input boxes, tinymce and the initialize for a jQueryUI dialog. On first load everything works fine. If the user loads the same form again, without refreshing the browser window, TinyMCE no longer shows content, can’t be clicked inside of and the dialog no longer updates it’s content and a few other bits of js stop firing. Now I thought this was an issue with the page and
I have problems generating the Canvas element with jQuery...
Hello I found an annoying problem using jQuery and Canvas. Look at the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <script type="text/javascript" src = "js/jquery-1.4.2.js"></script> <script type="text/javascript"> jQuery(window).bind("load", function() { var elem = $("<canvas>", {width:300, height:300}); var
Can a input textfield be split into two fields on ready with jQuery???
Hi there, I am using a particular Wordpress Plugin and it comes with a simple form generator. Now i like to alter the form layout a bit using the unique id's per input field. for example, i use this to alter the color and add a footnote jQuery(document).ready(function() { jQuery('#wpsc_checkout_form_7').css("color","blue"); jQuery('#wpsc_checkout_form_7').after('<br/>(Look closely)'); });Now i want to split input field #wpsc_checkout_form_7 into 2 input fields on form submit have the values of the
an idea: truncate a link text and on mouseover let the big linktext scroll, plugin :P
Hi all, iam sry for my really confusing topic title but i couldnt describe it proberly :P What i need is a plugin that marquees a truncated link text and take the rel attribute as marquee text source. Example: <a id="text2scroll" href="#" rel="this is the long version of the text">this is the...</a> On MouseOver on this link it should start to marquee on its place like this: this is the... his is the ... is is the l... s is the lo... is the lon... is the long... And on MouseOut it should just change
jquery menu plugin doesn´t work in IE8
Sorry for my english, I hope I can explain my problem. I contained a jquery menu from this site: http://apycom.com/ into one of my first projects which you can see here: http://www.lernberatung-karlsruhe.de/index1.html It works great in firefox, but not in IE6 and IE8? Here you can see the stylesheet information: http://www.lernberatung-karlsruhe.de/stylesheet.css Any Idea??? Thx!
overlay homepage instead of load new page
new to jquery, and going for some mighty challenging things right off the bat. i'm creating a portfolio website where the homepage contains images as links. when the user clicks on the links, instead of load to a new page, i would simply like a transparent overlay to occur, so that you can still see the content of the new page laid over the homepage. the user can get back to the homepage if they click on any area that isn't content from that page (over the homepage areas). the image links on the
<select> issue with IE8 and jQuery
hello! I'm having the following problem: I have a form that has 5 selects in it. ONLY in IE 7 and 8 when i click on of the selects first a white list appears than i have to click again and the normal option list is presented. This issue is not reproducing in any other browsers. The difference between IE and the others is that in IE the select tag has a sizcache, sizset, jQuery1278077284828 attribute. Using IE's developer tools I've removed these attributes before clicking on the select and this issue
Jquery Ajax calling WCF (asp.net)
Hello , I succeedd in calling the wcf however as you can see in the URL I'm passing an argument called name if I pass in the name english all is ok , but when I'm passing hebrew in the name I'm getting gibrish no matter what. what could be wrong ? one more question is it make sense calling WCF with type: "POST" (as calling a page method) ? TIA // Using jQuery to directly call WCF $.ajax({ type: "GET", contentType: "application/json; charset=utf-8", url: "Service.svc/DoWork?name="+name,
Prepending to an existing onclick
I have a link with an onclick on it <a href="/home" onclick="old_foo()">Home</a> I want the original onclick to fire "old_foo()" in addition to a new function "new_foo()" Doesn't work, only fires new_foo() when the link is clicked $(this).click(function() { new_foo(); }); Doesn't work $(this).click(function() { $(this).attr('onclick'); new_foo(); }); What am I doing wrong?
Get object of calling form in .each
Hi: I am using .each to find each form and attach validationEngine with it. When validationEngine success, i want object of calling/owner form. I am trying this, it is alerting that is is object. But i am not able to access "action" of form using this.action. However this.action is working fine bellow outside of validationEngine. $("form").each(function() { $(this).validationEngine({ success : function() { //
is there a contains function?
I looked over the API for the following functionality but couldnt find it. Is there a method already that does this: jQuery.fn.contains = function(selector){ return typeof $(this).find(selector).get(0) != 'undefined'; } ? Thanks.
Can you affect click event precedence?
I have the following situation $("li#FirstDrilldown").click(function() { $(this).find("div#SecondDrilldown").show(); }); $("div#SecondDrilldown").click(function() { // Do something }); <ul> <li id="FirstDrilldown"> <div id="SecondDrilldown" style="display:none"> </div> </li> </ul>I'd like to click FirstDrilldown and have it display div#SecondDrilldown. Then I'd like to be able to click SecondDrilldown to fire off a different click handler. The problem is that the
i can't get data from text box clone
hay all ,I'm beginner in here and also beginner for using jquery .so i have much problem to use jquery ^_^ and for the first time i have problem with clone form or clone text box and this is i get the value from my form, $(document).ready(function(){ var companyName = $("input[id='companyName[]']").attr('value'); $.ajax({ type: "POST", url: "saveWork.php", data: "companyName[]="+ companyName + counter + "&memberId=" + member , $('#saveChangeWork').hide('fast');
Using "this" - confusion
I'm confused on how "this" works visavi jQuery bindings. function Foo() { this.stuff = 0; this.callback = function() { $(this).attr('src', '...'+this.stuff); }; $('#image_id').load( this.callback ); } For $("#image_id")... will the callback method be called? For the callback method, will using "$(this)" act as if it was "$("#image_id")"? If so, how does the method know the difference between the image's "this" and the object's "this"? (to be exact, will it
Using an inline callback function
Having a really hard time getting this to work, could use a little guidance on what I'm doing wrong....the code should be fairly self explanatory.... function callbackTest(file, callback) { $.get ( file, function(data) { // do something callback.call(data); } ); } Then call it like..... $(document).ready ( function() { callbackTest ( "file.html",
jQuery cant select html tags that appended by jQuery?
<!DOCTYPE html> <html> <head><script src=js/jquery-1.4.2.min.js></script></head> <body> <span id="add">Click to add button</span> <div id="content"> </div> <input name="outside" type="button" value="original"> <script> $("body input[type=button]").click(function() { alert('YES!!'); }); $("body > #add").click(function() { $("body > #content").append("<input type=\"button\" value=\"created with jquery\">"); }); </script> </body> </html> When we click on the "original" button,it pops out a message,but
SetTimeout cancelation and restart problems
The problem I am having is I need to cancel and restart a settimeout function. Quite simply I dont know how to. If I just retype setTimeout(originalfunction(), 6000) when i later cancel it via clearTimeout(time); it continues as only the time variable one was cleard. and if i just put time; to recall it it doesnt work. How am i supposed to recall a variable with a function in? hope this makes sence. Thanks - James function slide(){ var time = setTimeout( function(){
When i use $.get without alert() my code not working into asp.net into Firefox
When i use $.get without alert() my code not working into asp.net ( updatePanel and ScriptManager for asp.net ). if i use this code in firefox dont work: jQuery(window).bind('onunload', function() { $.get('Sair.ashx', { user: document.getElementById('lblDe').innerHTML }); }); if i use this code in firefox work: jQuery(window).bind('onunload', function() { $.get('Sair.ashx', { user: document.getElementById('lblDe').innerHTML }); alert('postget'); }); Into Internet Explorer all this code working
child iteration
I have a table with a unique id. I add <tr>s to it programmatically. these <tr>s also have a unique IDs. how to i iterate for each tr in the table? pls help. thanks in advance!
Convert mootools script to jQuery
So there are a lot of 'conditional sticky sidebars'. But the best i have seen is being used by http://rockettheme.com/drupal. There sidebar scrolls, but stops at them bottom so it aligns with the main column. I love this but it's in Mootools and i use jQuery. Anyone who could convert this to jQuery? Here's the script: window.addEvent('domready',function() { var H=$('sidebar'),mainbody=$('mainbody'),wrapper=$('mainbody-surround'); var I=$('fader-container'); if(H&&wrapper&&!Browser.Platform.ipod&&(!Browser.Engine.trident4||(Browser.Engine.trident5&&isIE8())))
Inserted element not showing after .prepend() or .append()
Hi, I inserted a div into another div-container via .prepend() or .append(), it shows in Firefox Webdeveloper "Show generated source", so I know it's there and where it should be. But it doesn't show. When I just output text information in the div, it get's displayed but without any css styling, as if newly inserted DOM elements doesn't get styled. --- <div id="response"> <div class="uploadedfile"> I was here before and I got style. </div> <div class="uploadedfile">
Wrapping new lines with <p> tag.
I want to jQuery to format the following: <div> text on line 1 text on line 2 text on line 3 text on line 4 </div> like this: <div> <p>text on line 1</p> <p>text on line 2</p> <p>text on line 3</p> <p>text on line 4</p> </div> I have read a zillion posts and some that are similar but have not been able to translate them into my problem. Thank you.
calling function defined in ajax load?
Hi there if i am using jquery's $.ajax to load content and the content in the url ('test.php') is <script type="text/javascript"> function test() { alert('test called'); } </script> how do i get the function test() to execute? as if i call it (from the parent page in the success function) i get told it is undefined
Button and toggling
Hi all! I'm using jquery 1.4.2 and jquery-ui 1.8.2 and I need the following: I got n buttons, implemented using checkboxes, when user push one, previously toggled one is reset, to have only one button toggled everytime. But, when user push the same button two times, I need button remains toggled, while now it's reset. I try to force state handling click event on object with class "ui-button", without good results. I tried buttonset too, but I did not find any option to configure to force single selection.
nav does not working with jquery scrollable
subject pretty much says it all.. if you can fix this, you are a god among men. www.sirtuesday.com/test/index.html many thanks!
jQuery Hover Effect that would resemble Flash - is it possible?
I wanted to see if it would be possible to create an effect similar to a flash effect on a website. If you visit parkwoodonline.org and scroll down to the bottom, you will notice the little clover on the left hand side. If you hover over it, it fades in "made by clover" with a clickable link. If you move the mouse, it fades back into the clover. Would an animation like this be possible using jQuery? If so, how would I go about doing it?
jquery tabs resize map
According to the tabs docs I should be able to use resizeMap on the google maps. But the function is undefined. Is this correct?
getting the right code... some help would be useful!
Hello fellas, I've been working my brain out in the past two days with one jQuery script and no final result. I did managed to chop the 'thousands' of lines and reduced them to a few. I had set up a test page which can be found here: http://forweb.ro/easing/ I'm using jQuery easing but most likely my problem is not related to this. Is more related in getting the proper code. What I'm trying to achieve: I will have a left handed menu with several elements, let's say 7. Each of the menu elements will
Multiple values in rel attribute doesn't work
I've got the following code (from this tutorial: http://www.webstuffshare.com/2010/05/filter-image-view-using-jquery/ ): thisItem = $(this).attr('rel'); if(thisItem != "all") { $('.item li[rel='+thisItem+']').stop() .animate({ 'opacity' : 1 }); $('.pf_item li[rel!='+thisItem+']').stop() .animate({ 'opacity' : 0 }); } else { $('.item li').stop() .animate({ 'opacity' : 1, });
JQuery Loading Progress Bar
Dear All I am facing an issue while implementing a jquery loading progress bar in my asp.net application. It is working absoultely fine in Mozilla Firefox but not in IE. Issue is that progress bar display in both browsers but in IE progress bar image not move like it is moving in Firefox. I also saw the same behaviour on one of the sample (http://www.codeproject.com/KB/progress/JQueryProgressBar.aspx ) uploaded at code project site. Kindly help me to resolve this issue. Regards Kazim
Ajax, How can I distinguish between Server Unavailable and user moving away from the page
Hi there, Using 1.4.2 We are trying to show a popup error dialog when our server in not available. We had set this up to happen when inspecting if the status code in a XHR is 0, in the Ajax success handler (in success because of http://dev.jquery.com/ticket/6465) The problem comes when the user navigates away from the page, in Firefox and Chrome we get the status code 0. So the error popup appears just before the page is reloaded, users don't like this. IE7 and 8 seem to give different behaviour
At firefox 3.6.6 code like $.post("url",somedata,function(){alert('always run')}) always run, even the url server is offline
I want to show some tip when the server is not online. I have wrote some code like below: $(document).ajaxError(function(e,xhr,opt){ $.pnotify("the ajax is not fine"); }); Those code is fine in IE. But at Firefox 3.6.6, the handler of success always be called, even the server has down. thank u
:header selector - possible to exclude h4 and below?
When using :header selector, is it possible to exclude certain headers, e.g. h4 and below. So that :header applies only if h1, h2, h3 but not h4, h5, h6... etc? Or is there an alternative method? Thanks in advance, Pete
Events on ajax-got HTML form
So, this is JavaScript $(document).ready(function(){ $('#lgn_form').submit(function() { ajax($(this).serialize(),'toolSection','lgn_form'); return false; }); }); function ajax(data,section,source) { $.ajax({ type: "POST", url: "core/ajax.php", data: data+'§ion='+section+'&source='+source, success: function(html){ id = "#"+section; $(id).html(html); } }); }I use this, to manage user login-session,
Scroll bar problem when animating
Hey guys, I'm having a problem with the scroll bar appearing as a div larger than the screen size appears. Because the scroll bar changes the window size all the content gets shifted slightly when the bar appears/disappears. Any advice on how to deal with this? Cheers for any and all help!
ajax doesn't work in IE
hey folks i have a set of select fields, which when selected, send a value via ajax, to return a sub-selection for further choice. I have 3 levels of sub-categories like this. For some reason it works in FF only - not IE. link: http://bit.ly/9oO8pJ any help appreciated! thanks!
Need help with checkbox dependencies
Hi, I have 3 checkboxes "#MKDPT", "#NDQL1" and "#NDQL2". If "#NDQL2" is checked, I need to loop through and make sure "#NDQL1" is checked if it is unchecked, check it. Then check if "#MKDPT" is checked. If "#MKDPT" is unchecked it needs to be checked as well. Basically, if "#NDQL2" is checked the other two must be as well. Im having trouble checking the value to see if a checkbox is unchecked. I have tried several functions but to no avail, not sure which one to attach the click function or if
jQuery not recognizing function from .load()
Hello, I am a newer user to javascript and jQuery and I have ran into a small problem. Here is my test page: http://www.replay2avi.com/beta/test.html If you click the first link, everything works properly but if you click the link loaded from .load() the function fails to run. I am not sure of the terminology on this but all help would be appreciated. Thanks -Justin
Next Page