Event on response.redirect()
What would be the best way to call a jquery function on an ASP.NET response.redirect()? The idea is once my page redirects the user a message (which was saying loading) can now be hidden.
[jQuery] Detecting variable passed by # in URL
I've seen Flash be able to be triggered by passing a variable or sectionname through the URL after the #. For example, if I go to http://www.site.com/#about it would trigger flash movie for about section, and http://www.site.com/#contact would trigger the contact section of the flash. My question is would you be able to do this with jquery too? How do I pass a variable through from one page to another easily, possibly by using #?
[jQuery] Why the subsequent calls don't work on IE6?
Hi, I have the following function, I noticed the first time I pass a different index, the $.get will generate a request to the server, however if the function is being called with the same index again, there is no request being sent to the server. This strange problem happened only in IE (I am using version 6), but the codes work perfectly on Firefox. Each call to showComments(index) on firefox will generate a request no matter what values passed in as index. function showComments(index) { $.get("comments.html",
[jQuery] How save is Jquery with JSON
hello i havea question about how saveis jquery and JSON. i use $ajax({url:url,datatype:json...}) to get a markup of JSON items that updates the dom of my page via the success function passing the response to an function. and $.each the items to update the html of the element. in that funktion that manages the items i have a markup before that checks if the JSON got an markup of url to get. if it is so i pass that url to another funktion of $ajax({url:that url...}) with gets me the changed content
[jQuery] Clone not cloning HTML select options
Hi all, I'm running into a small problem with .clone() on select elements. If I create a simple HTML select with, say, 3 options, choose the middle one, then clone the select, the resulting clone does not have the middle option selected. Yet, with other form elements, the various chosen/selected attributes come with the clone and its children like you'd expect. I put together a bare-bones demo here: http://www.command-tab.com/temp/clone.html First choose B or C from the select, then click the Clone
[jQuery] How to pass parameter to the "close" event handler of the jQuery.ui.dialog?
The following codes won't work. If you call rPrompt twice with different index value, the second index value won't be passed to the "close" event handler. I can work around this issue by using a global var like gIndex to store the index value, but I would like to know if there is a more elegent solution. Thanks. function rPrompt(index, msg) { alert(index); if($("#prompt").length == 0){ $("<div id='prompt'><label></label><textarea rows='5' cols='30'></ textarea></div>").appendTo("body");
[jQuery] Another question on how to passing parameters to event handler
Hi, from the jQuery doc for dialog, there is: close Function(Event, ui) Callback for the close.dialog event. The function gets passed two arguments in accordance with the triggerHandler interface. Can anyone give me a simple example to demonstrate how to pass a parameter (like index, firstname, etc.) to the event handler of the "close" event. Thanks.
[jQuery] Formatting Anomaly in IE7 after Fadein? (with demo page)
I have a page with a 3-column layout. When a link is clicked, the middle column is supposed to slide up, have it's text replaced, and then fade in. This works perfectly in Safari, Firefox 2 and Firefox 3, but on IE7, the middle column fades in with a width that is less than half of what its CSS seems to provide for. I've put up a demo page here: http://www.flavorzoom.com/anomalies/fadein_anomaly/fadein_anomaly.html What is causing this, and how can I fix it? Thanks very much in advance to all for
[jQuery] Issues with getting local copy of jquery 1.3.1 to build from fresh SVN checkout
I checked out the branch http://jqueryjs.googlecode.com/svn/tags/1.3.1 I don't have "svn" on my machine (I use TortioseSVN instead) so the build.xml lines that run svn to check the version of SVN crashed on my machine. A simple commenting out fixed this. I noticed that the version.txt file had an extra carrage return in it that caused "ant min" to fail to complete the min build. After removing the extra carrage return the build min build finished. Hasn't anyone else noticed this. I'm using java 1.6.0_11-b03
[jQuery] [jquery.form] How to structure url parameter ?
jquery.form.js v2.18 How to structure the url parameter in order to use a function localized in a php file ? include ('myPHP_file.php'); $('#form1').ajaxSubmit( {target:'#output', type: 'post', url:'myFunction', success: showResponse }); myPHP_file.php: <? function myFunction() { ... } ?> This gives an 404 error
[jQuery] Examples of Plug-in for scripted tutorial in application?
I am trying to convince my boss, who is oldschool and very unfamiliar with javascript/jquery, that there is a better way to approach a problem than using Flash.... but can't seem to find any really good real world examples to show him. Thanks ahead of time. I know I have seen something like this before but I just cannot for the life of me remember what sites I may have seen it on. What I am looking for is a real-world example of any PLUG-IN/SITES that uses Jquery (or any javascript framework) to
[jQuery] Examples of Plug-in for scripted tutorial in application?
I know I have seen something like this before but I just cannot for the life of me remember what sites I may have seen it on. What I am looking for is a real-world example of any PLUG-IN/SITES that uses Jquery (or any javascript framework) to show a scripted tutorial on-top of a working application. I've found countless examples of scripted animation (which I am sure is the foundation of this idea) but cannot find any good examples of this idea. An example would a new application - when I log in
[jQuery] Exclude checkbox
I have a table, and I want a click on each row to trigger a function. This is my code: $("tr.Order").each(function() { $(this).bind("click", function() { showOrderDetails($(this).attr("id")); }); }); This works perfect! My problem is that I also have a checkbox on each row, and that also gets affected. So when I click the checkbox it triggers function showOrderDetails(). How to I remove the action from check box? -- View this message in context: http://www.nabble.com/Exclude-checkbox-tp21686977s27240p21686977.html
[jQuery] cluetip plugin crashing Firefox with external style sheet
When using the cluetip plugin, I am loading an external url. The tip loads fine if my external page is plain text/html, however if I reference an external style sheet (using the <rel> tag), the plugin crashes Firefox. It's happened more than once. Is there a workaround for this other than inline style? I need to use a .css file since I have multiple pages to show with the cluetip. Thanks!
[jQuery] jQuery generated links are printing out the whole URL when user tries to print their info
We're having a problem with jQuery generated links appearing normally on screen, but printing out the whole URL in print view. Any suggestions? Thanks, Dean Farrell
slideToggle in IE8 RC1 behaving oddly
Hello all. I recently designed and built a portfolio site for myself having learned some basic html and css. I had an idea of how I wanted the page to function and after Googling I discovered it could be done with javascript & jQuery. Yesterday I managed to successfully get slideToggle working in my website thanks to an excellent guide. I tested my site in IE7, FF3 and Safari and whilst there were a few minor annoyances in each of the different browsers, I was able to fix them by trial and error
[jQuery] $("button").click(function () {$("p").toggle("slow"); for sevoral items.
Is it possible to add : <script> $(document).ready(function(){ $("button").click(function () { $("p").toggle("slow"); }); }); </script> that works for sevoral items, example, this is my menu : <button class="button" style="background:transparent #33CC00">News</ button> <button class="contact" style="background:transparent #33CC00">Contact</button> <button class="staff" style="background:transparent #33CC00"> Staff </ button> <button class="join" style="background:transparent #33CC00">Join</ button>
[jQuery] [jQuery 1.3.1] Losing event handlers when appending same element multiple times
Here is the code: HTML: <ul> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> JS: $(function(){ var handle = $('<span>Click me</span>'); handle.click(function() { alert('Thanks'); }); $('ul li').append(handle); }); With jQuery 1.2.6, each time I click on any list's element it shows alert. With 1.3.1 in FF3, Safari 3 & Opera 9.63 alert is only displaying when I click on first element. In IE6,7 everything is ok. Is this some kind of bug?
[jQuery] Seeking div hide/show plugin with access by URL
I'm looking for a jQuery 1.2.6 compatible plugin providing the following: In a page with a number of sections in divs, on page load a specified div is visible but all others are hidden. Clicking a link in the sidebar navigation hides the current div and reveals in that position the div which the link references by id. Reveal/hide animation is not essential but would be preferably be a fade rather than Coda-type scrolling. It should not be possible for the user to hide all the divs. The link to the
[jQuery] disable submit not working in IE7
I'm using JQuery 1.2.6 with the following script: <script type="text/javascript"><!-- $(document).ready(function(){ $("button.submitButton").click(function () { $(this).attr("disabled","true").html("Processing, please wait..."); $("button").attr("disabled","true"); }) }); // --></script> It works as expected in FF3 but is is slightly broken in IE7. On initial click, the submit button appears to take focus, on second click, the "Processing..." message appears and the button is disabled. The problem
[jQuery] how to use focus in a form?
well my problem is: I have n forms on the website that I working, then I need one script on jQuery that's work in all using the focus to the first element onf the form (excluding the firt hidden input), can someone help me???, my starting code is here: $(document).ready(function(){ if('form:first:input'){ $('input:first').focus(); }else { $('select:first').focus(); } });
[jQuery] validate input type=hidden and number of errors
1. I have a form which is validating quite nicely, using the validation plugin. On the form, a user enters a postcode, a googlemap pops up, user drags the marker and saves it and the lat/lng of the marker is copied back to hidden input fields in the parent form. I want the form to validate that those hidden input types are not empty - as an empty field indicates the lat/long had not been saved. I can get it to validate - but I can not get the custom error message to show as it is looking (i think)
[jQuery] jtemplates & null data
I've got a page that I'm converting over to use jTemplates, but the data it's returning contains null data (eg - missing email address or people who are retired and have no work address/phone). When I was processing the JSON manually and spitting out HTML, I wrote a function that returned an empty string if the data was null or the data itself. Is there a way I can do this using jTemplates? Thanks, Dave
[jQuery] Resizable() work incorrectly with Iframe
Hi guys. I have a problem with the resizable() function. When its use with iframe, vertical resizing work incorrectly. Who knows how fix it? Here is the code: <html> <head> <title>title</title> <style type="text/css"> body { padding: 0; margin: 0; } #resizeDiv { background: #EEE; width: 100%; height: 170px; border-top: 1px solid #CCC; position:
[jQuery] .append() into style element causes error in IE only
Hi, I am trying to append css into a pre existing style element. $("style").append(myClass); This works as expected in Firefox, but not IE. The HTML on the page validates to HTML strict, so I'm fairly sure that it's not the issue with IE that append() won't work on incorrectly written elements. If I change my code to $("p").append(myClass); it works as expected. Was just wondering if this is a know issue with IE or jQuery and if anyone had a work around, I am out of ideas that don't involve considerable
[jQuery] UI Dialog Position Based on Link Position
I'd like to open a dialog when a link is clicked, and have the dialog open beside the link, similar to a tooltip. Are there any examples on how to calculate the position where the dialog should show up? What's the best way to position it so that it shows within the confines of the page (i.e. if the link is right- aligned, the dialog should popup to the left of the link, etc.).
[jQuery] how to get div content with frame?
Hi guys, i have a frame; - myframe.html - main.html - top.html in top.html i have a div; <div id="myDiv">my teste work!</div> and in main.html i try to get a div content of top.html using; alert($('#topFrame').contents().find('#myDiv').html()); but i only got null return... anybody knows how i can get a div content with another frame? thanks :)
Creating plugins
I'm relatively new to jQuery, and love it. The only thing I'm having a problem with is transforming simple functions into plugins. I've got some code that will do an inline search and show only the LI's that match what was put into the #search_box. Could someone please show me how to transform this into a working plug-in? // Extend to add case-insensitive :contains selector jQuery.extend(jQuery.expr[':'], { "contains-ic": "jQuery.fn.text.apply([a]).toLowerCase().indexOf(m[3].toLowerCase())>=0"
[jQuery] SlideToggleUp, this.options.curAnim is undefined
<html> <head> <style> .hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 10pt; font-family:Verdana } </style> </head> <body class='hmmessage'> Hi, I am running into the error "<span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch">this.options.curAnim is undefined" for the method SlideToggleUp. this.options.curAnim[ this.prop ] = true; jquery-1.3b1.js (line 3827). The problem occurs when I am trying to close a window using this code: $('#windowMin').bind(
[jQuery] .val() problem
Hi, I have a set of radio buttons with name="field_submcategory[value]" I want to figure out what value has been selected, even after the user hits refresh (so .change won't work). I've tried this but the alert I get is always undefined, independently from what button is checked: alert($('input:radio[name=field_submcategory[value]]:checked').val()); Thanks!
Hover functon grows slooow
Hello, I've written a simple hover function that changes a list item's border color. When there are only a few list items, it works fine. However, with 10 or more <li>s, it grows extremely slow. Strangely, it is not slow directly after page load. It actually gets slower the longer the page sits. I can't figure out what's causing it, but it's bad. Here's the code function thumb_rollover(){ $(".thumb_li").hover( function(){ $(this).stop().animate({ "borderTopColor" : "#8EA6CF",
[jQuery] Implementing a Knob Control
Hi, I need to implement a knob control for one of my projects (eg. a volume knob). Ideally I would like to use jquery. I have spent some time searching for any resources to get started. Not only I can't find anything in jquery, I can't find anything even resembling a knob implementation in javascript in general. I did find a few sites who sell VB or .net knob controls, but nothing in js. anyway, not sure if anyone can help, but any hints towards a resource or starting point would be much appreciated.
ajax submit and form plugin!
hi im using now this plugins for ajax submits http://malsup.com/jquery/form/#api but i have a small problem with it my coe looks like this: <script type="text/javascript"> $(document).ready(function() { $('#profedit').ajaxForm(function() { $("#msgbox").removeClass().addClass('messageboxok').text('Done').fadeIn(1000); }); }); </script> everything works fine but i need a if statement here now... in the php script is there a statement like this: if
[jQuery] Read request parameters with jQuery?
I'd like to know if it is possible to get the request parameters on a page using jQuery. It can be done using regular JavaScript (like so: http://blog.pothoven.net/2006/07/get-request-parameters-through.html), but this seems like something that jQuery or a plugin for jQuery could easily do. And that would look much cleaner.
[jQuery] How can I pass a parameter to an eventhandler?
Hi, How can I pass a parameter to an eventhandler? for example: $("td").bind("click", test) function test(message) { alert(message); } How do I give the message parameter to eventhandler test? regards
[jQuery] accordion plugin in ie7 does not fully collapse
I'm using the accordion plugin to achieve as a wizard for a multi-part form. in ie7, the li don't fully collapse so the form does not fix all the way to the top. it does not happen in firefox. does anyone know of a way to fix this issue? i thought the most recent version of the accordion take care of the problem based on reading, but it is to no avail. any help, directions are greatly appreciated. thanks
Which plugin is the best one of the Ajax in the jquery
I am a newbie for jquery. I used to use Extjs. Honestly I think Extjs is more better than Jquery. But Extjs is too huge, so I also wanna be in charge of Jquery. I'm really confused about JQuery that there are so many plugins. I can not know which one is best. it'll be great appreciate that some one will give me an answer or teach the best way of learning Jquery
Jquery Tree plugin choices?
Hi Guys, Im trying to locate a folder/tree plugin which can generate a tree list using contents from a database. I would also like the ability to add/delete a folder which would make an entry/deletion from the database. The other thing I would like is a checkbox beside each branch which I could select and retrieve the key of the branch/folder into a text field. Can someone point me to a reliable plugin, something which has a decent example that I can look at to create my list of folders. P.S I have
[jQuery] Problem with document.getElementsById()
HI, I got a very different situation when writing program for ajax. Actually I need to get 55 rows from a table displayed in row format......now when i click the link (any of these 55 links) i need to get details immediately after the link for this i used ajax....the problem i am dynamically the links below each row i assigned <div> tag with id as row. But when coming to javascript i tired to send div tag id along with the php program that is generating xml file. I am reading id in to a variable
[jQuery] can i call ready function more than one time in a html page
Hi to jQuery Guys, I am new to jquery. i have few probs with jquery. 1. I want to know can we execute ready function twice in a html page? If we execute, does it affect the functionality of ready function. 2. I have one main js file that's included in each page and after this i want to include js file specific to each pages. And i also want to write ready function in specific pages. is it okay?
Next Page