[jQuery] Determining the optimal page width,height
My cropping image function works just after loading the image but not during window resizing. The problem is if there's a width="100%" somewhere in the page but no height="100%", enlarging vertical only adds white space instead of cropping larger. Any size calculation based on actual values fails so I need a way to determine the optimal size without white space on unlimited screen size. Is this somehow possible? $.fn.cropImage = function (maxW, maxH, minW, minH) { var w = $(this).width(); var h =
[jQuery] test if element as a class
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=843123510-27042007><FONT face=Arial size=2>hello,</FONT></SPAN></DIV> <DIV><SPAN class=843123510-27042007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=843123510-27042007><FONT face=Arial size=2>i'm trying to test a condition whether a link has a given class,
[jQuery] Show and Hide DIV
Hi all, I'm in this situation : <ul id="scTopNavList"> <li><a href="#divPippo">Pippo</a></li> <li><a href="#divPluto">Pluto</a></li> </ul> when I click on Pippo I show the div #divPippo e vice-versa with Pluto with this code (I don't know if is good but it work :) ) : $("a").click(function(){ var div = ($(this).attr("href")); $(div).show("fast"); return false; }); I want this behavior: when I click on Pippo the divPippo must appear but if another div (example Pluto) is opened it must be closed.
[jQuery] Does addClass overwrite property
I have a very basic question. If I use addClass, will it overwrite a css property. Say for example I use $(".div1").click(funtion(){ $(this).addClass("div_active") }); The div1 had css property background-color set to white and in the class div_active background property is black. Will the addClass make the background of div1 black. I could not do it and it seems the only property that changes is the one not defined previously in .div1. Is there a way to achieve it. Thanks
[jQuery] Getting href value
I have this: <div class="nav_one_selected"><a href="/jQuery/pages/index.html">Index</a></div> I was attempting to read the href of the anchor tag like this: var initlink = ('a', 'div.nav_one_selected').attr("href"); I also tried var initlink = ('div.nav_one_selected/a').attr("href"); I get an error like: ('a', 'div.nav_one_selected').attr is not a function I'm not sure what I'm doing wrong here.
[jQuery] plugin sizes, part 2
What I meant to ask before I submit hastily was whether all the feature requests we, I included, are sending to the plugin developers are bloating the plugins? (sorry for 2 emails)
[jQuery] Ajax application history
Hi. We've learned over time to build in backbutton functionality and bookmarkability to our DHTML widgets or at least try to ascertain what our clients will want ahead of time... Just because although people usually don't think to ask up front, often when they use the application a bit and they can't bookmark, paste URLs, or use their browser back button they come back asking for some or all of those. This library takes a simple approach to creating at least a model that could be used to address
[jQuery] Workarounds to IE eventListener issue
Does anyone have workarounds to the IE eventListener issue? I have several pages with jQuery code I keep local on the "page" that it's needed on. However, if that page is loaded via AJAX, IE simply doesn't execute it. I can't even get an alert('hello') to work on the loaded page. I feel a bit desperate right now. I can't be the only one to load my scripts in this fashion, so I hope someone knows a way around it (rather than loading all my scripts on the top page).
[jQuery] Nested .each functions
i'm currently building an FAQ system using XML and jQuery. So far, everything is has been great until now. I have an $.ajax request that calls to an XML file that contains the questions and answers for a particular topic. when you click your topic, it loads any tags with the name "title" into a SPAN in an empty DIV. now i'd like to load all the tags with the name "answer" into a SPAN below the "title" SPAN. i'm using a .each function to loop through all the "title" tags, but it's not working for
[jQuery] selecting a parent
Hey all, I want to select the first parent of my selection that is a td element. How do I do that? I don't want parent(), since the number of parents in between may vary, or parents(), since I don't want to select ALL the td's that are up the hierarchy. Just the first parent that's a td. So like: <td> (want to do something to this td) <div>(1 to n divs here) <div>click me!</div> </div>(1 to n closing divs) </td> I think I need an xpath or something, but I tried some stuff and I'm stumped. -- Josh
[jQuery] Background-position-x
How would I change the X axis of background-position only on Firefox? I need to leave the Y axis alone, and only change the X. <font style="font-style: italic; color: rgb(204, 204, 204);" size="4">Subliminal message to John Resig of Mozilla....background-position-x is a good thing. </font> Glen
[jQuery] Cascading Stylesheets presentation tonight
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=871283620-26042007>Hey everyone...just wanted to let you know that I'm going to be making a presentation on CSS tonight for the Nashville Coldfusion Usergroup. here's the details. If you'd like to watch live, use the link at the bottom of the email.
[jQuery] TableSorter sorting weird
Hello, Anyone know how to get the TableSorter plugin to reliably sort short dates? By default it works with dates in a long format (US) like this: April 25, 2007 12:00 Am But it won't work with a short format (out of the box) like: April 25, 2007 However, I did manage to get it to sort with that short date format, but it seems to be a bit unreliable. For example, I have four rows that are being sorted like: May 1, 2007 April 15, 2007 April 16, 2007 April 27, 2007 Clearly this is wrong and should
[jQuery] Draggables: detecting if I'm in a region after stopping
Hi, What is the best way to do this? I want to check, for a ghosted draggable object, that when the user let's go of the draggable (onStop event fires), how can I tell if any part of my dragged object intersects with another DIV on screen? Thanks, - Dave
[jQuery] jQuery include plugin
I thought that you may find this plugin interesting: http://www.gnucitizen.org/projects/jquery-include/ all this plugin does, is to provide with mechanism for including external js files.. so you can do stuff like this: $.include('http://path/to/script1.js'); $.include('http://path/to/script2.js'); $(document).ready(function () { // the files are loaded, so now you can use them... }); $.include('http://path/to/script3.js'); $.include('http://path/to/script4.js');
[jQuery] Viewing all handlers bound to an element?
Does anyone know if there is an easy way to see what handlers are attached to a given element? thanks, -tao
[jQuery] Obsolete xml data islands
I am starting an asp.net project, and I would like to use javascript and client-side xml processing to make for a more responsive interface. Initial prototypes look good, but actually getting the xml using asp.net seems a bit tricky. A <xml> data island worked well, but this element is dropped from msxml6. It seems like there will be browser issues even in a pure IE shop. The proposed solutions I found for these problems have almost scared me off client-side processing. Does jQuery promise any future-proofing
[jQuery] problem with auto submit upload file
Works fine in FF, Safari...IE doesn't like this...been toying with this for hours and havne't gotten anywhere with it. Am I missing something obvious? It works via an iFrame... $(document).ready(function() { $('#iform').change( function() { $('#iform')[0].submit(); parent.updating(); }); }); <form enctype='multipart/form-data' action='?a=exhibit' method='post' name='iform' id='iform'>\n"; <div> <input type='file' id='jxbg' name='jxbg' /> <input type='hidden' name='upload'
[jQuery] blockui message centered to the form element
hey... is there a way to display a loading message using blockui or somthing similar that only shows the "loading message" inside the form element and align it to center of the form instad of putting all the screen black ? its looks bad if i got a website of news papaer and i got 4 fields of inputs in the bottom of the page, its black screen my whole website... :P anyone did somthing similar? -- View this message in context: http://www.nabble.com/blockui-message-centered-to-the-form-element-tf3651315s15494.html#a10199363
[jQuery] fire script on return values.. how?
hey i got a script that returns me on submit ajax json data... somthing like {status:1,data: loading secound script} how can i do a script that waits to data to be back and then execute another script? user submit>proccessing data from another php page>return results (if its status 1 - then run a secound php script ...} -- View this message in context: http://www.nabble.com/fire-script-on-return-values..-how--tf3651533s15494.html#a10200072 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Cannot set height or width of div
I am simply trying to set the height and width of a div. I have included the dimensions.js file as well a jQuery I can get the height and width - just cannot set it. Please help. //Swaps current div with ajax loader div function showAjaxLoader(divToReplace){ var dtr = document.getElementById(divToReplace); var w = $(dtr).width(); var h = $(dtr).height(); $('div.ajaxLoader').width(w); $('div.ajaxLoader').height(h); alert(w + ' ' + h); } Also tried this: //Swaps current div with ajax loader div function
[jQuery] Update on new travel site
Classis mistake - I didn't leave the link: https://www.trainbreaks.com Sorry
[jQuery] IE cachine .ajax calls?
Hi, On IE 7.0, I'm noticing the same data is repeatedly returned to me from this call var data = $.ajax({ type: "GET", url: 'draw_modules.php', async: false, error: function(request, msg){ alert( "Error upon saving request: " + msg ); }, success: function(request) { // alert( "Saved" ); } }); On Firefox I am getting different (and correct) data each time. I have even tried putting these PHP directives at the top of my "draw_modules.php" page header("Cache-Control: no-store, no-cache, must-revalidate");
[jQuery] new Autocomplete plugin - feature requests
Hi, Thank you for documenting and improving the Autocomplete plugin. I have two needs that probably can be handled with the current features: 1) The formatted item contains links and I want to be able to click on one link (to find more info) before selecting the name, i.e. only the leftmost name triggers the selection but not the additional links 2) I have a menu where I toggle different autocomplete urls and I want change the autocomplete after I select a new url, i.e. if I am searching for a word
[jQuery] New Travel Site using jquery
Hi everyone, I have just released my first site using jquery and in particular jquery's ajax functions. The concept is to provide a one page application and improve the user experience. It only launched today (as always there are a few teething problems) but I would love to hear your comments. Regards Ben
[jQuery] Sortables: making a DIV sortable that didn't start out that way
Hi, I want to emulate the functionality of http://www.netvibes.com/, specifically the part where you drag a "Featured Feed" from the left column, into the Sortable section (the main viewing area of the screen). I have no idea where to start here. The feeds on the left are not Sortable starting out, but eventually become that way. Could someone list at a high level what can be done to achieve this? Thanks, - Dave
[jQuery] plugins page!!!!
please oh please someone on the jquery committee respond to my claim that the plugins page is getting crazy. we need sub categories for the categories. I am volunteering to work on updating the page according to instructions that are given to me.
[jQuery] click event and z-order
hi, if have two elements (a image in a table) which have a click event registered (on <img> and <tr> element). if i click on the img in the table both click events are executed. i would expect that only the first element in the z-order gets the click event. it there something i missed, how can i change the behavior? thanks stefan -- Stefan Kilp SK-Software, Entwicklung & Beratung email: kilp@sk-software.de fon : +49 6151 93344-0 fax : +49 6151 93344-20 Herta-Mansbacher-Str. 98 64289 Darmstadt, Germany.
[jQuery] unsubscribe
unsubscribe
[jQuery] Multiple form submit issue
Hello, I am using the forms plugin, and have a page that dynamically creates multiple forms for editing photos. Each form has a button, that has a click event is added to it, which submits the form. I am having problems getting the click event to submit the form so that the ajaxSubmit() fires. Using the method below, the form submits bypassing the jquery ajaxSubmit, and does not have any of the options attached to it. Any ideas? <script snippet.. var options = { beforeSubmit: showRequest, // pre-submit
[jQuery] For the promotion people another list of Ajax tools - where Jquery is not listed
http://wiki.osafoundation.org/bin/view/Projects/AjaxLibraries -- Scott Wickham ******************************************************************************************** Everyone is equal and everyone is the best at everything. --- Principal Skinner "Success is a lousy teacher. It seduces smart people into thinking they can't lose." -Bill Gates 99% of the time, in my experience, the hard part about creativity isn't coming up with something no one has ever thought of before. The hard part is actually
[jQuery] jQuery HTML Documentation Generator
The "jQuery HTML Documentation Generator" at http://jquery.bassistance.de/docTool/docTool.html seems like a great tool to create standard docs for jQuery plugins. I have some questions: 1) Is there any directions to make something like this the standard? 2) Is anyone working on a php version so as to be browser-agnostic? 3) Is there any documentation about what @tags are supported? 4) Is it extensible for use with my own custom @tags ? Thanks! Matt Kruse
[jQuery] $(document).ready( ) ... tricky ajax problem
Hello everyone. I'm trying to solve a very tricky problem here. The problem is as follows: On a page, there is a $(document).ready() function, let's assume it does something simple: $(document).ready( function(){ $(".alerter").click( function(){ alert('you clicked me.'); } ); } ); It works great, I click on an "alerter" and I get an alert. Now, on this page AJAX is invoked, and a new div, containing several "alerter"s, is inserted into the DOM. How do I then run the $(document).ready() function on
[jQuery] css styles
This href was posted in the Firebug discussion forum. Read http://developer.apple.com/internet/webcontent/styles.html. I was wondering if jquery addresses the issue described?
[jQuery] fadeOut() and relatively positioned images?
Hi guys, Sorry if this is a duplicate, but my original never seemed to show up. I'm having trouble with the following fadeOut(). It effectively hides the div instead of fading it out, but if I set the fadeOut to several seconds a callback function will show the fadeOut() is actually taking that amount of time. Could it be my images are getting moved out of sight? <div id="content"> <div id="flags" style="position:relative"> <img src="flagUS.gif" style="width:55px; height:51px; position:relative;
[jQuery] library conflict
Hello I'm toying with using jQuery and prototype/scriptaculous on the same site/page. Libraries are loaded as usual in the head section, and I'm calling the jQuery corner plug-in with: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function($j) { $j("#box").corner("round 20px"); $j("#banner").corner("bottom 20px").corner("top bevel"); ... }); </script> and using prototype/scriptaculous somewhere in the page with: <a href="javascript:void(0)" onclick="Effect.toggle('notme','BLIND');
[jQuery] Taconite, tables and IE
Here's my taconite: <append select="#data"> <table> <tr> <td> 65 </td> </tr> <tr> <td> 70 </td> </tr> </table> </append> It works fine in Firefox and Opera. In IE, however, the table doesn't show up. Other elements like div's and input's are displayed correctly alert($('#data').html()); displays all the appended html correctly
[jQuery] I found an interest website http://www.openwebware.com/products/openwysiwyg/demo.shtml
I found an interest website http://www.openwebware.com/products/openwysiwyg/demo.shtml
[jQuery] get array elements by name like $("input[@name=myField[]]")
How do you get elements by name if they are named as array? Ex: <input type="checkbox" name="myField[]" value="1"> <input type="checkbox" name="myField[]" value="4"> <input type="checkbox" name="myField[]" value="5"> $("input[@name=myField]") does not work $("input[@name=myField[]]") does not work either Do I need to escape [] somehow?
[jQuery] Process get variables to add a class
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=031535611-25042007><FONT face=Arial size=2>hello!</FONT></SPAN></DIV> <DIV><SPAN class=031535611-25042007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=031535611-25042007><FONT face=Arial size=2>I would like to add a "selected" class to one of the menu items
Next Page