Hi,
I'm trying to bind a function to the body element of a document that
will fire any time any part of the page's DOM changes.
$("body").change() doesn't seem to do it. It does for some changes but
not all. In particular, not when HTML or element attributes are added/
removed. Sorta key! It doe
Oh, that is very nice, thanks for posting that, Ricardo.
Either of these approaches could be useful depending on the situation, so
it's good to have them both in your bag of tricks.
-Mike
> From: Ricardo
>
> Nice. I'd just take advantage of event triggering to make it a bit
> simpler:
>
> $.f
That code only sets the visibility of the #state and #province elements when
the document is first loaded. It's missing the other part of the
functionality from the original code and from Ricardo's version and mine:
Updating that visibility whenever the #edit-profile-country element changes.
That
If you want to avoid document.write, append should work just as well
(the head element already exists):
$('head').append('#mainimage
{ visibility:hidden }');
On Apr 4, 9:27 pm, Derba wrote:
> That works a lot better. Thanks for putting up with my questions
> hector.
>
> On Apr 4, 8:21 pm, Hect
jQuery.support is for feature detection. The whole point of it is to
avoid browser detection - which is still available via jQuery.browser.
Instead of sniffing the browser and serving fixes according to
previous knowledge about it's flaws, you check for correct
implementations of the exact feature
I suggest reading this article, starting with the section "Events
Don't Work with Added Elements"
http://www.learningjquery.com/2008/03/working-with-events-part-1
On Apr 4, 7:34 pm, one09jason wrote:
> Hi all,
>
> I'm new to jquery, so bear with me. I have discovered that elements
> that were
I'm using 1.4.8 with Supersubs...great plugin! One issue I'm running
into is getting Supposition to run with it- am getting this JS error:
$.superfish is undefined (line 57) (Mac 10.5 w/ FF 3)
This works fine with Superfish 1.4.1, of course. I've tried it with
Supersubs turned off with the same
Hi all,
I'm new to jquery, so bear with me. I have discovered that elements
that were written to the document using the html() manipulation
function can not be selected later on. Specifically, I have added
some elements to the page using html(). The elements look like
this:
delete
In my java
I can't find the example I just posted, and this is stripped down
quite a bit.
I just want to record the scroll bar position before a click to a
feature and go back when finished with that feature. This works,
except that it builds a history of where the scrollTop positions were
when the feature
This code attempts to determine the position of the browser scroll bar
before clicking to a feature and then return to that position when the
feature is closed. It works. But it is also building a history of
every position for every time the feature is used, which I don't want
it to do.
So, the f
Hello everybody. Hope you can help me with this problems.
I am doing an ajax request as follows:
$.ajax({'type':'post','url':url,
'complete':function(xhr,text){} });
now $.ajax follows the redirect to the page I eventually get in text
is not necessarily the original url. I canno
> p.s. I don't know what happen with my repeated original post. I must
> have gotten overzealous with the submit key. :p
Note that, clicking "More options", you can delete your posts.
**--** Steve
On Apr 4, 5:12 pm, John H wrote:
> Ricardo, this is equally instructive. Thanks to you as well.
Good abstraction Ricardo. But I wouldn't use trigger like that. It
feels a bit overkill plus that it might hurt performance on the
client.
My approach would be something like this, doing exactly the same +
better performance:
$.fn.showIf = function( show, arg ) {
return this[ show ? 'show' :
I don't understand. How does that make the image useless? It should be
visible by JS and non-JS browsers, except that JS browsers will see it fade
in. Am I missing something?
-Hector
On Sat, Apr 4, 2009 at 3:55 PM, Derba wrote:
>
> Well, I that was the first thing I thought of, but I generally
I've encountered a minor issue performance wise.
For some reason, after injecting the text into a UI tab the
performance of the tabs suffers greatly. Why would getting the
contents of a file and injecting them into a tab as text slow the
performance of tab switching after the injection?
On Apr
My mistake, I don't think you can write to the document after it has loaded.
Try this instead:
document.write('#mainimage{visibility:hidden}');
$(window).load(function() {
//when everything is finally loaded, fade image in
$("#mainimage").css({visibility: 'visible'});
$("#mainimage").animat
You may want to try a different approach. For example, you could use
javascript to add a new style rule to the CSS that sets the image to
visibility: hidden. This would have to happen *before* the dom has finished
downloading to ensure that it always hidden, so no need to wrap it in
$(document).rea
I tried the document.write method you told me to try, but using it
anywhere causes the whole webpage to load up as a blank page. I have
NO idea whats happening.
How about just using CSS on the image ?
On Apr 4, 7:35 pm, Derba wrote:
> I'm trying to have jquery set an image's opacity to 0. Then, while the
> image is fully loaded, it will fade the image in.
>
> It seems to work fine, unless the images have already been viewed in
> the browser and are stor
No problem, Derba. Glad to hear it worked :)
-Hector
On Sat, Apr 4, 2009 at 4:27 PM, Derba wrote:
>
> That works a lot better. Thanks for putting up with my questions
> hector.
>
> On Apr 4, 8:21 pm, Hector Virgen wrote:
> > Actually, it might be better to just start off with 0 opacity and no
That works a lot better. Thanks for putting up with my questions
hector.
On Apr 4, 8:21 pm, Hector Virgen wrote:
> Actually, it might be better to just start off with 0 opacity and not mess
> with the visibility property at all:
> document.write('#mainimage{opacity:0}');
> $(window).load(functi
Try setting the opacity to 0 when you set it to visible.
-Hector
On Sat, Apr 4, 2009 at 4:15 PM, Derba wrote:
>
> the css visible seems to make it visible before it has a chance to
> fade in, but I will tinker with it some to see if I can get it to work.
the css visible seems to make it visible before it has a chance to
fade in, but I will tinker with it some to see if I can get it to work.
Actually, it might be better to just start off with 0 opacity and not mess
with the visibility property at all:
document.write('#mainimage{opacity:0}');
$(window).load(function() {
//when everything is finally loaded, fade image in
$("#mainimage").animate({opacity: "1"}, 1000);
});
-Hector
O
scratch that, including the document.write line in $(window).load
(function() causes some error while leads to just a blank page in the
browser.
Using the first line of document.write('#mainimage{visibility:hidden}'); seems to work fine
thought.
On Apr 4, 8:03 pm, Derba wrote:
> I tried the do
thats works, thanks hector! Sorry about the previous confusion
On Apr 4, 8:07 pm, Derba wrote:
> scratch that, including the document.write line in $(window).load
> (function() causes some error while leads to just a blank page in the
> browser.
>
> Using the first line of document.write('#main
Well, I that was the first thing I thought of, but I generally try to
avoid that as it renders the image useless if the browser does not
have javascript enabled. If this was just a minor part of the webpage
it wouldn't be that big of a deal. But I am using this for an image
gallery that is the mai
You can't use *just* CSS, because browsers without javascript will never see
the image.
-Hector
On Sat, Apr 4, 2009 at 3:49 PM, MorningZ wrote:
>
> How about just using CSS on the image ?
>
> On Apr 4, 7:35 pm, Derba wrote:
> > I'm trying to have jquery set an image's opacity to 0. Then, while
> From: John H
>
> Michael, this is excellent and very instructive--thanks!
Glad it was helpful, John.
> I had to remove the dollar sign from $epc otherwise Firefox
> reported "missing variable name".
That doesn't sound right - there must have been something else causing that.
$epc is a perf
I'm trying to have jquery set an image's opacity to 0. Then, while the
image is fully loaded, it will fade the image in.
It seems to work fine, unless the images have already been viewed in
the browser and are stored in cache. In this case, the image is
already loaded by the time of $(document).r
Superfish will not add those classes; only read them. You have to add
those classes to the li tags yourself depending on what page is
loaded; then superfish will read them and format them accordingly.
On Mar 28, 3:55 pm, Fluvius wrote:
> Hi,
>
> I'm usingSuperfish1.4.8 on my site (http://users.t
Yes, by making sure that the call to set current class on the li
parents is made before calling superfish. That way superfish will know
which li's are current.
On Apr 3, 1:53 pm, spinozagl wrote:
> Is it possible to keep the second level on the nav-bar visible when
> one of the listitems has the
Okay, the call to set classes on the li tags have to be made before
calling superfish. That's what was missing.
On Apr 3, 4:30 pm, spinozagl wrote:
> How to ensure that in the navbar style menu the second level ul
> remains visible to show the second level selected item. This item and
> its pare
On Apr 4, 2:08 pm, "sato.ph...@gmail.com"
wrote:
> I'm not even sure if that title is correct, but I was looking at this
> demo for dynamic totals:
>
> http://jquery.bassistance.de/validate/demo/dynamic-totals.html
>
> and was wondering if there was some way to assign specific values to
> certa
Ricardo, this is equally instructive. Thanks to you as well.
John
p.s. I don't know what happen with my repeated original post. I must
have gotten overzealous with the submit key. :p
Michael, this is excellent and very instructive--thanks!
I had to remove the dollar sign from $epc otherwise Firefox reported
"missing variable name".
Thanks also for answering my question re: existence. Your explanation
makes perfect sense.
I assume by your exclusion that wrapping the whole th
Nice. I'd just take advantage of event triggering to make it a bit
simpler:
$.fn.showIf = function( show, arg ) {
return this[ show ? 'show' : 'hide' ]( arg );
};
$().ready(function(){
$('#edit-profile-country').change(function(){
var value = $(this).val();
$('#state').show
This should work:
$(new Option(project, insertid, true)).appendTo('#dropdown');
the Option constructor takes the text, value, selected arguments.
cheers,
- ricardo
On Apr 4, 8:24 am, LinkGuru wrote:
> This turned out to be the solution
>
> var drp = $('#dropdown');
> drp.child
I would code it like this:
$.fn.showIf = function( show, arg ) {
return this[ show ? 'show' : 'hide' ]( arg );
};
$(function() {
var $epc = $('#edit-profile-country');
function setVisibility() {
var value = $epc.val();
$('#state').s
i am also trying jQuery("#jsc_leftbody", lt).html();
i cant for the life of me see why this is not working correct
if helps the page is here:
http://undergroundinnertainment.com/2009/index.php?option=com_comprofiler&task=userProfile&user=64&Itemid=67
On Apr 4, 2:13 am, Mathew wrote:
> I ma havi
I'm all for migrating to the jQuery.support() utility method, but
there is not definitive test available to detect IE6 specifically. Do
we have a consensus on this yet?
Hi There,
If I am not mistaken, 'contains' is a selector not a method.
http://docs.jquery.com/Selectors/contains
You could try with the following:
$("span.total:contains('1)").parent().hide();
OR, if you decide to place it in If-else block, then do the following:
if ($("span.total:contains('
Thanks for reply ,
The script add an iframe in my dom (normaly this technique work fine)
In my case the ajax submission down because it's automaticly replaced
with a http submission .
best regard .
On 4 avr, 14:19, Mike Alsup wrote:
> > I have a probleme with uploding file using ajaxForm
> > The
"div/p" is supposed to get paragraphs that are children of divs. It's
XPath syntax, which jQuery no longer supports.
Try
var dom = $('div > p', data);
or
var dom = $(data).find('div > p');
instead.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
That is exactly what I was going for, thanks!
On Apr 3, 11:44 pm, Eric Garside wrote:
> If you get the developer build, each of the files is separated out
> into a: ui.core.js, ui.draggable.js, etc format. If you want to add a
> bit of spice:
>
> $.uinclude = function(){
> var scripts = ['co
Or if you want a more advanced way of uploading content, try jqUploader.
http://www.pixeline.be/experiments/jqUploader/
--
Javier Martinez Fernandez
ecentin...@gmail.com
To sell and buy games between user
Within an admin I created there is a nested sortable unordered list
with the jQuery UI Sortable plugin to allow the user to reorder list
items in the second (ul id="sortlist4") and third (ul
id="sortlistb23") level nested lists. The first level list (ul
id="sortablelist") cannot be sorted. Here is
Hi, I need to update tooltips dynamically, but has no easy way for
this. After rummage jquery.tooltip.js I
found them, just add following lines at beginning save() method:
if (this.title)
{
this.tooltipText = this.title;
"dom is always null "
What the heck is the selector "div/p" supposed to get?
On Apr 4, 5:40 am, Albert wrote:
> $(document).ready(function() {
>
> $.ajax({url: '/page/test.html',
> type: 'GET',
> dataType: 'html',
> timeout: 5000,
> erro
> Hi there guys,
> I want to build an ajax upload script using jQuery.
> The problem is that i can't find a way to send the $_FILES
> Can you help me?
You can not upload files using ajax. Check out the form plugin for
this functionality.
http://www.malsup.com/jquery/form/
> I have a probleme with uploding file using ajaxForm
> The probleme is not in data submission or in receiving but the form
> dont submit wih httprequest (without choosing a file the ajax form
> work fine ) .
That's correct. Files can not be uploaded using the XMLHttpRequest
object. The form plu
$(document).ready(function() {
$.ajax({url: '/page/test.html',
type: 'GET',
dataType: 'html',
timeout: 5000,
error: function(){
alert('error');
},
success: function(data){
$(document).ready(function() {
$.ajax({url: '/page/test.html',
type: 'GET',
dataType: 'html',
timeout: 5000,
error: function(){
alert('error');
},
success: function(data){
var dom = $("div/p",data); //can I
Hi there guys,
I want to build an ajax upload script using jQuery.
The problem is that i can't find a way to send the $_FILES
Can you help me?
Thank you
Sincerely,
Alex
kjhgfdfsdf
On Mar 15, 3:12 am, Foreigner wrote:
> Hi,
> I'm trying to use jQuery to get some HTML with Javascript usingAJAX.
> My response gets inserted into the contentDiv element but my
> javascript inside the response doesn't get executed as the
> documentation says (http://docs.jquery.com/
>
I'm successfully using jeditable to submit via a function using
jQuery.ajax and the async : false option , but am having an issue
aborting if an error is returned.
How can I get the edit box to stay activated and / or revert back to
the original value if there are errors? I'm returning http statu
I'm not even sure if that title is correct, but I was looking at this
demo for dynamic totals:
http://jquery.bassistance.de/validate/demo/dynamic-totals.html
and was wondering if there was some way to assign specific values to
certain menu items. For example, if I chose Learning jQuery as an
it
I'm not new to web development or javascript, but am relatively new to
jQuery. I'm wondering if someone would be willing to quickly review
the following code for efficiency and best practices. The function
works as required, but I'd like to take this as a learning
opportunity.
In a nutshell the c
I'm not new to web development or javascript, but am relatively new to
jQuery. I'm wondering if someone would be willing to quickly review
the following code for efficiency and best practices. The function
works as required, but I'd like to take this as a learning
opportunity.
In a nutshell the c
Hi all,
I have a probleme with uploding file using ajaxForm
The probleme is not in data submission or in receiving but the form
dont submit wih httprequest (without choosing a file the ajax form
work fine ) .
Thank you .
I have html generated by php (several html codes like below):
Previous
|Image 1 of
1 |
Next
What i need to do is to hide "header" div if span class "total"
contains number 1. (like it is in above example) I tried code
something
I'm not new to web development or javascript, but am relatively new to
jQuery. I'm wondering if someone would be willing to quickly review
the following code for efficiency and best practices. The function
works as required, but I'd like to take this as a learning
opportunity.
In a nutshell the c
I've seen this post now, but I can's see my problem mentioned there.
My extension breaks the toolbar in Firefox if I have remove all other
scripts in the XUL and only leaves jQuery there, no other code at all:
http://www.mozilla.org/keymaster/
gatekeeper/there.is.only.xul">
So this is not ca
On Apr 4, 5:19 am, Jim D wrote:
> Hi. I have a problem of getting a "grey screen" instead of grey screen
> with JQuery ThickBox on top of that.
> I need to open ThickBox on page load.
> It seems that sometimes! DOM is not finished when ThickBox is trying
> to modify it.
>
> Here is a code I hav
On Apr 4, 9:24 pm, LinkGuru wrote:
> This turned out to be the solution
>
> var drp = $('#dropdown');
> drp.children().each(function() {
> $(this).removeAttr("selected");}).end().append("
> selected='selected'>"+project+"");
>
> I am sure jselect would have worked too (possibly
This turned out to be the solution
var drp = $('#dropdown');
drp.children().each(function() {
$(this).removeAttr("selected");
}).end().append(""+project+"");
I am sure jselect would have worked too (possibly a bit of an
overkill?), so thanks to RvFlash
On Apr 4, 10:31 am, LinkGu
Thanks RvFlash, I'll take a look. I just missed your post before I
sent my chase up message.
On Apr 4, 10:29 am, LinkGuru wrote:
> Can anyone help with this? It appears to have been overlooked. The
> title should really have been "changing the selected item in a
> dropdown" (perhaps) because I k
Can anyone help with this? It appears to have been overlooked. The
title should really have been "changing the selected item in a
dropdown" (perhaps) because I know how to do the append, I just can't
get my head around how to modify the existing items in the list. Will
it be easier to rebuild the
You can see this plugin to do that :
http://www.rvdevsign.net/sources/javascript/jselect/jselect.html
I hope that it will help you. Hervé.
On Apr 3, 7:22 pm, LinkGuru wrote:
> With the following code, I'm managing to append to a drop-down list
> using jQuery, but can't figure out how to amend on
You can use AHAH instead of AJAX to load content into a div, though
I'm unsure whether you can load external xhtml in...
http://microformats.org/wiki/rest/ahah
On Mar 30, 4:27 am, bjorsq wrote:
> If you want a website loaded in a div, then that would be a little bit
> difficult - I was really t
Use the callback for the load() function. It will execute after the
new content has loaded:
$(document).ready(function(){
$("#page").load("page", function(){
$("#main").css("height","111px");
});
});
On Apr 3, 10:25 pm, Yuzem wrote:
> Hello.
> I have a page that loads another
71 matches
Mail list logo