[jQuery] change css relative to css file

2007-10-09 Thread bleen

I have this:

$('#id').click( function(){ $(this).css('background-image','url(images/
img.jpg)'); } );

Problem is that I want to use a path (images/img.jpg) that is relative
to my CSS file, not to the current page...  The obvious first question
will be why not just put /path/to/images?  The answer is I'm trying
to incorporate something into a drupal module and so I cannot be
certain of what the full path will be.

Thoughts?

Alex



[jQuery] Re: change css relative to css file

2007-10-09 Thread bleen

Doh ... I thought of the solution 3 seconds later ... just add a class
that is defined in the css file instead of changing the actual style

On Oct 10, 12:37 am, bleen [EMAIL PROTECTED] wrote:
 I have this:

 $('#id').click( function(){ $(this).css('background-image','url(images/
 img.jpg)'); } );

 Problem is that I want to use a path (images/img.jpg) that is relative
 to my CSS file, not to the current page...  The obvious first question
 will be why not just put /path/to/images?  The answer is I'm trying
 to incorporate something into a drupal module and so I cannot be
 certain of what the full path will be.

 Thoughts?

 Alex



[jQuery] jquery error on Mac Safari 2 only (maybe 3)

2007-08-27 Thread bleen

site in question: www.nypost.com (scroll down to most emailed/most
popular on bottom right or classififeds search on VERY bottom
right)

For some reason we keep getting this error:

Value undefined (result of expression elm.toSource) is not object.



Thoughts?
Alex



[jQuery] Re: Avoiding invalid markup

2007-08-19 Thread bleen

Are you saying that the markup (as it downloads form the server
(including your JS above)) is not validating? Or your markup AFTER the
JS has made its changes is not validating? I'm guessing its the
former. If it is, try putting all your JS in an html comment tag. like
this:

!--
$(this)...
--



[jQuery] Re: Looping through data object

2007-08-13 Thread bleen

foreach( options as option){
  do stuff
}



[jQuery] Re: using jqModal - problem with executing jqm with triggers loaded in via AJAX

2007-08-01 Thread bleen

I found a trick burined inside the jqmodal example page ...

in your AJAX loaded content do this:

$().ready(function(){  });

This seems to work just like $(document).ready  but inside AJAX loaded
content.



[jQuery] Slightly OT: Google Maps API Permission denied to call method XMLHttpRequest.open

2007-07-31 Thread bleen

Here is my issue:
The js I use on the following page works great using jquery, jqmaps
and the google maps API to load up a map:

http://dev.c21hull.com/listings/map.htm?listing_id=GL-9027

Now, I want to load teh map in a modal window via an AJAX call so I
use jqmodal. When you click mapit the modal window loads (I know the
close btn doesn't do anything yet) and the AJAX request is returned
nicely, but when the map tries to load within the content that was
just returned I get a Permission denied to call method
XMLHttpRequest.open error.  Here is the example:

http://dev.c21hull.com/listings/browse.htm?byid=9027bytype=allbyprice%5Bfrom%5D=0byprice%5Bto%5D=40%2Bbybeds%5Bfrom%5D=0bybeds%5Bto%5D=5%2Bbybaths%5Bfrom%5D=0bybaths%5Bto%5D=5%2Bbysqft%5Bfrom%5D=0bysqft%5Bto%5D=5000%2Bbyacres%5Bfrom%5D=0byacres%5Bto%5D=41%2Bsearch=search

I understand that the error in question happens when you make requests
cross domain, but why does this code work in teh first example but not
the second? After researching, it has been suggested I use a SS proxy;
how can I do that here?  Please explain as much as possible - I'd like
to learn this and really understand it.

Thanks!!
Alex



[jQuery] Re: multiple AJAX requests

2007-05-18 Thread bleen

nevermind...

I was reusing a variable



[jQuery] multiple AJAX requests

2007-05-18 Thread bleen

I have a page with 2 AJAX requests that happen on document.ready...

here's what happens:

request1 goes out
request2 goes out
request2 receives response intended for request1
response comes in from request2, but does not get handled

What do I do about this?

--
Alex



[jQuery] multiple AJAX requests

2007-05-18 Thread bleen

I have a page with 2 AJAX requests that happen on document.ready...

here's what happens:

request1 goes out
request2 goes out
request2 receives response intended for request1
response comes in from request2, but does not get handled

What do I do about this?

--
Alex



[jQuery] chaining question

2007-05-16 Thread bleen

If the function below (which is called in a mouseover event) is run
too many times, too quickly it doesn't work (i.e. the html in question
is not changed)

function loadedContentProcess(tab,result){
content[tab] = result;
$
(#popular_quicksearch_content).hide().html(content[tab]).fadeIn(slow);
}

However if I change the function this (below) it works great not
matter how many times (and how quickly) it is called. Why?

function loadedContentProcess(tab,result){
content[tab] = result;
$(#popular_quicksearch_content).hide();
$(#popular_quicksearch_content).html(content[tab]).fadeIn(slow);
}

--
Alex