I know how to switch from an element a to another b, but i can't
find a way to re-switch from b to a.
You might want to explain the problem better, with a working script.
That script will replace every clicked link with the letter b - I
doubt that is the intended operation.
If you are
Are you attaching the click handlers before or after you load the ajax
content?
If you're trying to apply the click handler before, it won't work
because the anchors don't exist yet.
Either apply the click handler after the content is loaded, or use a
plugin like LiveQuery to handle updates for
Not familiar with corners, but the problem is that you're applying
corners before the div called differentcorners exists.
The line $(#differentcorners).corner(tl 8px).corner(tr br 8px);
is being executing once the page is loaded - it searches for the div
called 'differentcorners', but at the
Possibly one of the most frequently asked questions:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
On Jul 8, 1:54 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi folks,
I have a page with a photo on it. I load the comments for
Does the image exist in the DOM on page load complete?
On Jun 30, 1:44 pm, Adwin Wijaya [EMAIL PROTECTED] wrote:
Hi ...
I have table and inside contains image which class name = 'reason_img'
my js script was like this
script
$(document).ready(function(){
.. another
Charles is a proxy debugging tool that (i think) every Ajax developer
would find useful debugging this sort of thing:
http://getcharles.com
Lets you look under the hood without modifying your code.
On Jun 21, 8:59 am, ajpiano [EMAIL PROTECTED] wrote:
So literally no one has ever wanted to
Nevermind - reread your post and Charles won't help debugging the
remote script execture - just in checking that your response is what
you expect.
On Jun 21, 8:12 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
Charles is a proxy debugging tool that (i think) every Ajax developer
would find
Hi there.
Best (or fastest) way to find out if something is in the DOM is to
check:
if ( $(#createNewAccount).length )
If .length is greater than 0 it will exist.
So your script can read:
$(document).ready(function() {
if ( $('#createNewAccount:checked').length || !$
It looks like you're getting the script ok, but there is other stuff
you need to do to create a google map. There are a couple of good
jQuery googlemap plugins (eg, jMaps)
So you'd do something like this:
$(#togglegmaps).toggle(
function(){
$.getScript(http://maps.google.com/maps?
The issue is that the click function is bound on document.ready - so
stuff added later won't have the binding.
See the FAQ:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
On Jun 18, 10:21 am, Brian Cummiskey [EMAIL PROTECTED] wrote:
Change return true to return false.
I assume the geoencode() function fires some sort of ajax call. You'll
need to submit the form once this ajax call has returned a result.
Note that currently, when your function hits return true, it has
fired off the request but a response has yet to be
As an example do you mean:
$(document).css('p', 'color: red').css('h1', 'font-size: 200%');
On Jun 14, 6:13 am, Brian J. Fink [EMAIL PROTECTED] wrote:
I was tinkering with jQuery when I got an idea: why not have a way to
do something like:
$(document).css(selector,rule);
Then it could
Hi Colin,
The dimensions plugin was recently added to the jQuery core, and you
can combine with the plain javascript window.scrollTo method to do
what you want.
Here is a little plugin I whipped up:
script language=javascript type=text/javascript
$(document).ready(function(){
$.fn.extend({
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
On Jun 16, 4:52 am, Thasmo [EMAIL PROTECTED] wrote:
Hoi guys!
I define a event trigger $('#id div a).click().
The url in the href attribute of the a tag is called via $.ajax
and the
That's not a bad idea. Maybe more suitable for a plugin than in the
core though.
I guess there are a couple of issues:
First of all, it might be tricky setting up a timed callback to an
annonymous function. You'd probably have to restrict it to named
callbacks.
Secondly, to do it right you'd
Nothing wrong with regex. Note that the expression you have will catch
all Caps and Numbers - so something like Go Here will have the G and
H in the spans.
A better pattern might be /^([A-Za-z0-9])/g -- this will match the
first character of the link, but only if it is a sensible character
(ie,
This is better done on the server side with a scripting language, or
with basic javascript - the following page should help:
http://www.w3schools.com/jsref/jsref_obj_date.asp
On Jun 3, 6:04 pm, hubbs [EMAIL PROTECTED] wrote:
I am wondering if jQuery has any solutions to calculate the time
Hihi,
scroll is a window event. Try:
$(window).scroll(function(){
alert('W00t!');
});
On Jun 4, 2:41 am, taxpehbam [EMAIL PROTECTED] wrote:
For some reason code below doesn't work in IE. I don't think i found a
bug, maybe i'm doing something wrong?
$(document).scroll(function(){
Two elements should never have the same ID - make sure the links and
the paragraphs do NOT have the same ID. Some people use the 'rel' tag
for this sort of thing. Use the class attribute to denote objects that
should be grouped (ie, the paragraphs you want to hide) Eg:
ul id=myList
lia
You can do it with selectors:
$('#main:not(:has(*))').hide();
Ie - 'select the element with the id main that does _not_ contain
any other element'.
Note that this is different from $('#main:empty') which includes text
nodes.
On May 29, 12:10 pm, Michael Geary [EMAIL PROTECTED] wrote:
I would
not come after the first element,
hide the first element.
Sorry this sounds strange. I am trying to create a work around for my
CMS.
On May 28, 5:53 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
You can do it with selectors:
$('#main:not(:has(*))').hide();
Ie - 'select the element
if ( $('.box:visible').length == 0 ) {
$('#left').hide();
On May 22, 12:13 pm, thekman [EMAIL PROTECTED] wrote:
Hi all,
I have a bunch of divs on my page that all have a class of box, the
boxes can be hidden by the div id, so when all are hidden, i also want
to hide their parent
What do you mean exactly?
I don't see why you couldn't, but I'm not sure why you would.
Have an example?
On May 19, 7:30 am, Mike [EMAIL PROTECTED] wrote:
Do these work well together or cause conflicts?
But ASP.NET provides controls that produce ajax type interactions
right (I believe that was what Mike was referring to)? That is, it
will be generating JS for the client. Obviously if you've got a clear
understanding of what those ASP.NET controls do, you should be fine.
Like I said though, if
jQuery works on the generated source seen by the browser - that is,
it's CLIENT side.
Rather than posting the CF SERVER source, could you post the source as
seen by a browser viewing the page. That will be a LOT easier to
decipher. For example, from the example above, we can't tell what the
This has come up a few times - pretty sure there isn't a super clean
way of doing it, but I'd probably prefer something like this:
$(#div1).load( scripts/generateA.php, {VAR: var}, checkLoaded );
$(#div2).load( scripts/generateB.php, {VAR: var}, checkLoaded );
$(#div3).load(
If you use the 'data' object, you can keep this stuff attached to the
relevant objects and out of the global namespace.
On May 20, 9:07 am, FreeKill [EMAIL PROTECTED] wrote:
That would chain them all together though right, rather than fire them
all off at the same time?
I was thinking of
You have to intercept clicks on links, store the href while the page
fades then redirect to that address:
$(document).ready(function(){
$('a').click(function() {
var target = $(this).attr('href');
$('body').fadeOut('slow', function() {
window.location = target;
H... CF might be causing the problem, but you'll still be able to
see it in the generated code.
Can you compare the output with and without cfoutput - the
difference should give you a clue as to why it isn't working.
On May 19, 11:59 pm, Bettina [EMAIL PROTECTED] wrote:
Hi
Yeah of course.
Even though you can't use the id selector directly, you can still use
the id as an attribute selector (works in IE7 anyway).
$(document).ready(function(){
$('div[id=wrapper]').each(
function(i){
$(this).attr('id', $(this).attr('id')+'_'+(i+1))
}
);
});
On May 13,
Hi there,
A quick fix is to modify your extension to:
jQuery.fn.toggleActive = function(){
$('#iconBox ul.bar li').children(a).removeClass(active);
$(this).addClass(active);
};
You would then call by:
$('#page2').click(function() {
($(this).children(a).toggleActive();
First of all, hide the div so it's initially... err.. hidden.
$('#subNav').hide();
Now you can throw in a function to call when the div loads content:
$(a#interactive).click(function () {
$(#subNav).load(work_interactive.html, {}, function() {
$(this).show('slow'); // change to
First of all, in this:
$('ul#list_container a:contains(hidden_div)')
The word 'hidden_div' is just a string literal - ie it's just looking
for the word hidden_div. If you want to look for the text you've
assigned to the _variable_ hidden_div you just need to go:
$('ul#list_container
(' + hidden_div + ')')
Cheers,
--Karl
_
Karl Swedbergwww.englishrules.comwww.learningjquery.com
On Apr 30, 2008, at 3:38 PM, Hamish Campbell wrote:
First of all, in this:
$('ul#list_container a:contains(hidden_div)')
The word 'hidden_div' is just a string literal
You'd use a selector like:
$('.myClass:not(.selectedClass)')
On Apr 30, 9:56 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi,
If an image has a class myClass, I would like to set a mouseover/
mouseout behavior. However, if an image has two classes myClass
selectedClass, I would like to
How are you viewing the generated source?
Bare in mind that just because you can't see javascript in the browser
source of a page doesn't mean javascript hasn't been executed.
Likewise, you wouldn't see the html loaded from an ajax call in the
browser source -- as it was injected after the page
I don't think it's worth a whole plugin to to this - it is relatively
simple to add a counter to the toggle event functions, and to use the
data object to store your counts.
Eg:
$('a.toggle').toggle( function() {
$(this).data('count', 1 + ( $(this).data('count') || 0 ) );
generated
source.
Hamish Campbell wrote:
How are you viewing the generated source?
Bare in mind that just because you can't see javascript in the browser
source of a page doesn't mean javascript hasn't been executed.
Likewise, you wouldn't see the html loaded from an ajax call
.
Hamish
On Apr 29, 12:04 pm, hubbs [EMAIL PROTECTED] wrote:
Did you use .load or .ajax? I used .load and it does not work...
On Apr 28, 3:49 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
I've tried it myself - put an alert into the script and you should see
something happen. jQuery
Hi hi,
':has' and ':not' are your friends:
$('#containerDiv tr:not(:has(div.taskSummary))')
On Apr 29, 1:26 pm, Shawn [EMAIL PROTECTED] wrote:
Eventually got this working:
$(tbody tr, #crewSchedule).each( function (pos) {
if ($(.taskSummary, this).length == 0) {
$(this).toggle();
Yes, absolutely!
...
I'll assume you were not looking for just a yes/no answer :p ... you
should probably have a look at the online documentation, paying
particular attention to the Ajax and Manipulation sections. Give it a
stab first and if you have some more specific questions about the
Could you post the html? That would help a lot. If the links exist
your code should work.
btw, ripple, you shouldn't need to use 'each' - addClass will apply to
all objects in the collection. Using 'each' just adds overhead.
On Apr 24, 3:14 am, ripple [EMAIL PROTECTED] wrote:
Why not loop
Because this wasn't immediately obvious to me when I started out, here
is why:
The jQuery selector will always return an object. Eg:
typeof($(#doesntExist)) == object.
That means if( $(#doesntExist) ) will evaluate true.
This is intentional - ie, if you do something like this:
Want to post your code?
Whitespace could cause issues. Also, what if you set overflow:hidden
for the tds?
Thanks,
Hamish
On Apr 22, 8:04 am, Brian Ronk [EMAIL PROTECTED] wrote:
Well, the problem isn't actually putting the image into the table,
that part is fine. I'm running into a problem
I don't think it would deter anyone any more than using POST - it's
just as trivial to use firebug to call your encrypt/decrypt function
as it is to modify an ajax call in transit. I could concievably help
stop evesdroppers - but if you need to protect the data in transit it
should be over a
You could reapply the effect with mousemove.
On Apr 17, 4:46 am, weepy [EMAIL PROTECTED] wrote:
Hi
I have a div with other divs nested inside it (these may have further
divs nested inside). I want to provide a hover effect when each is
hovered upon.
The trouble I have is that upon
$(.highlight).removeClass;
The selector $('.highlight') is choosing all your objects that have
the class 'highligh'. removeClass still needs to know what class to
remove (ie, the method removeClass doesn't know how or why you
selected those particular elements). It takes the class name as an
in
IE 7. I'm rather stumped. The only thing I can think of is to work on
the rest of the project and hope I find an answer somewhere along the
way.
David D
On Apr 6, 10:35 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
Either the event didn't bind properly, or something is preventing
Could you post your code?
Looking at the source (1.2.3) it appears that timeouts are not set for
syncronous calls. I'm not sure if it's even possible - the
XMLHttpRequest doesn't appear to have a timeout method.
The best solution would probably be to not use syncronous requests at
all. You'd
Err, this line:
Try the jQuery Development group - it sounds like a bug.
Should read:
Try the jQuery Development group, they might be able to explain why it
does/doesn't work.
I'm fairly sure that you can't script a timeout for syncronous though.
On Apr 11, 11:35 am, Hamish Campbell [EMAIL
Have you considered using the jQuery UI Dialog plugin?
http://docs.jquery.com/UI/Dialog
On Apr 11, 11:50 am, Josh Nathanson [EMAIL PROTECTED] wrote:
Hey Paul,
There isn't really any jQuery code that helps with this, but I've got a
little plugin jqURL that can make it a bit easier:
Why don't you let jQuery handle the AJAX as well? The . in your
email probably contains some interesting code if you've created the
call yourself:
$.get('someurl.php', data, function(response) {
$('.update_em').html(response).show();
});
http://docs.jquery.com/Ajax
Ciao,
Hamish
On
This should be quite easy - for each section start you add some
padding, for each section end you remove it:
var sectionPadding = 0;
var sectionIndent = 10;
$('#survey div').each(function(){
if( $(this).is('.sectionend') ) {
sectionPadding -= sectionIndent;
}
Is this an ajax call? 90% of these questions seem to come down to the
call not being completed.
On Apr 10, 1:38 pm, OhNoMrBill [EMAIL PROTECTED] wrote:
Yup, agreed. Tried that method too. Both return undefined. Any other
thoughts on why the div and/or it's contents are not showing up in the
Here is one way - it will find the header (th) for any cell (td) given
that there are no merged cells and a single header row.
$('td').click(function(){
var col = $(this).prevAll().length;
var headerObj = $(this).parents('table').find('th').eq(col);
// A quick test!
alert(My cell
The JSON example on the autocomplete
site doesn't work as it sends the entire
remote data to the browser instead of
returning just a limited number of items.
Probably becuase it requires a backend page to provide dynamic results
based on the search query.
Note:
When the user starts
, 3:57 pm, Hamish Campbell [EMAIL PROTECTED] wrote:
However, taking this approach
would have multiple headers and
footers. How should I go about this?
If you're using plain HTML then yes, you'll need to duplicate the
header/footer data in the fall back pages.
Do you have
However, taking this approach
would have multiple headers and
footers. How should I go about this?
If you're using plain HTML then yes, you'll need to duplicate the
header/footer data in the fall back pages.
Do you have a database and/or server-side scripting language at your
disposal?
On
Sounds like some sort of ajax queuing plugin is in order. Would have
to be more complex than animation queues.
eg, queue constists of a 1-d array. Each element in the array can be a
request, or an array of requests (that execute simultaneously). The
queue pops the first element, performs the
Rather than setting CSS attributes directly, use classes. Eg, with
hover:
$('.someElements').click(function() {
$('.someElements').removeClass('aSelected');
$(this).addClass('aSelected');
}
$('.someElements').hover(
function(){
$(this).addClass('aHover') },
function() {
Remove:
$('#someElement').hide('slow').remove();
Html:
.html() isn't suitable - ie what does it mean to 'slowly' change the
html content of an element?? Perhaps a typing effect, or cloning a
div, changing the content then fading the original - but these would
be specialised effects that you
File size or dimensions?
On Mar 4, 4:25 pm, Xinhao Zheng [EMAIL PROTECTED] wrote:
hi all,
is there a way to do this that can work both under ie and FF.thanks
in advance.
George
My solution from:
http://groups.google.com/group/jquery-ui/browse_thread/thread/35a33d1c50f0e724/e527c8f47ba183e0?lnk=gstq=extend+center#
and in action at www.deft.co.nz
$(document).ready(function() {
jQuery.fn.centerScreen = function(loaded) {
var obj = this;
So if your php page (called submitVote.php) takes form vars
(integer) couponID and (bit) vote and it returns the new
percentage (eg 15%), and the percentage value lives in a div called
votePercentage, and you have two buttons called 'voteYes' and
'voteNo':
$('document').ready(function(){
http://docs.jquery.com/How_jQuery_Works#Launching_Code_on_Document_Ready
On Mar 3, 10:21 am, fetis [EMAIL PROTECTED] wrote:
Hi, all.
I often use jQuery outside ready() function. Like this
div id=asome html/div
script
$(#a).some actions
/script
Have this way some hidden troubles or it's
put
all your JS in one place and it's better coding style.
I guess the question is: what are you trying to gain by NOT wrapping
it in document.ready?
On Mar 4, 11:02 am, fetis [EMAIL PROTECTED] wrote:
On Mar 3, 6:20 am, Hamish Campbell [EMAIL PROTECTED] wrote:
http://docs.jquery.com
that bubble up to the document object.
Do you mean something like this:
$('*').click($.delegate({
'#nav a.exit': function(){ /* do stuff */ },
'#nav a.open': function(){ /* do other stuff */ }
});
... that looks like a _really_ bad idea.
Thanks
Hamish Campbell
On Feb 21, 9:42 am
What version of jQuery are you using? .val() should return rather
than undefined if you find inputs successfully.
HOWEVER, there is another problem:
Putting ':checked' means that if the boxes are NOT checked, jQuery
won't find them so .val() doesn't exist for the object. Remove the
':checked'
Talked about this over here:
http://groups.google.com/group/jquery-ui/browse_thread/thread/35a33d1c50f0e724/e527c8f47ba183e0?lnk=gstq=extend+center#e527c8f47ba183e0
This is my extension to centre a div to the screen:
$(document).ready(function() {
jQuery.fn.centerScreen =
Could do it like this:
$('#myElement:not(input)').text(s);
$('#myElement:input').val(s);
So you could have a function like:
function setElement(id, s) {
$('#'+id+':not(input)').text(s);
$('#'+id+':input').val(s);
};
So that whenever you set an element you can call:
What if you name the top frame 'topFrame' and make the link into
target='topFrame'?
Or, better yet, ditch frames altogether :P :P :P
On Feb 19, 1:16 pm, Justin [EMAIL PROTECTED] wrote:
Here's the page
http://guestbook.spinskins.net
It's just a guest book/comment section of my site. If you
You can use 'insertBefore' to do this very easily.
For example:
$(document).ready(function(){
$('.smallDiv').click(function(){
$(this).insertBefore($(this).prev());
});
});
This will swap a 'smallDiv' element up by one when you click it. If it
is already the first one,
A straight port would be:
var confirmAction = function(action){
$('#button_'+action).hide();
$('#button_back').hide();
$('#confirm').trigger('submit'); // assuming the id of the form is
'confirm'
return false;
}
On Feb 12, 11:18 am, Josoroma [EMAIL PROTECTED] wrote:
If i have
$('mySelector').mouseover(function() {
// do something on mouseover and focus
})
.focus(function(){
// trigger the mouseover event on focus
$(this).trigger('mouseover')
});
On Feb 4, 7:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
... at least, that's what I think I need to do!
I'm seeing it too
(on the demo page: http://www.aclevercookie.com/demos/autogrow_textarea.html)
It happens while it has focus.
On Feb 4, 9:35 am, Bruce MacKay [EMAIL PROTECTED] wrote:
Hello folks,
Has anyone had experience with the autogrow plugin
$(document).ready(function(){
$(window).resize(function(){
$('#pagewrap').width($(window).width());
});
});
The margin and padding of the body needs to be set to 0 for this to
work properly. Note that as soon as you start adding borders to
#pagewrap you're going to get problems. Also
You can check for the current css property value of an element - so,
for example, you could set the background color of a hidden object and
see check that value at run time.
Are you loading css sheets dynamically?
On Feb 1, 1:21 pm, Yahoo [EMAIL PROTECTED] wrote:
Theres any way with jquery to
Ah, I see.
Maybe have a look at the uploader plugin? Otherwise, I think you're
stuck :/
On Jan 30, 5:11 pm, Steffan A. Cline [EMAIL PROTECTED] wrote:
on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote:
Some code would be useful - you've said that .click() doesn't work
Whenever you create new selects you will need to bind the click event
to the new selects.
On Jan 31, 11:51 am, RyanMC [EMAIL PROTECTED] wrote:
$(select).change(function(){
alert(Selected: + this.value);
});
Is there any reason why this wouldn't be working on all the selects on
my
I've used jmap2 a bit. It's really nice to have a jQuery-like way of
playing with maps (as well as geocoding, etc) - but as was said
before, hard to say if it is worth it for the added overhead and
restrictions it places on your code.
That said, I think there is room for a more extensive jQuery
Some code would be useful - you've said that .click() doesn't work in
FF, but it probably isn't the .click() bit that isn't working.
One suggestion (untested) is that you include both the normal button
and the new image, but hide the image with CSS by default. This means
that if JS is disabled,
Actually, I just went a re-read the thread and I have NO idea what it
is you're trying to achieve.
On Jan 30, 8:01 am, Steffan A. Cline [EMAIL PROTECTED] wrote:
on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote:
On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote:
I know
Wow, that is awesome. Thanks!
On Jan 5, 2:08 pm, Chris Charlton [EMAIL PROTECTED] wrote:
BETA:http://xtnd.us/download/dreamweaver/jquery/
Works with Dreamweaver MX (6), 7, 8, and CS3 (9). Provides the jQuery
API via code hints and snippets in Dreamweaver's code view.
Please send me your
);
...
}
On Jan 22, 12:03 am, Hamish Campbell [EMAIL PROTECTED] wrote:
Can you show the source of the selects, because the description is a
little confusing. You have array of selects? So multiple selects, but
only one has a value at any one time? Or do you have a multi-selection
select
Here's how you do it (tested and working):
!-- HTML --
dl
dta href=No-Javascript-URL_AItem Group A/a/dt
ddItem 1/dd
ddItem 2/dd
dta href=No-Javascript-URL_BItem Group B/a/dt
ddItem 1/dd
ddItem 2/dd
ddItem 3/dd
/dl
script
$(document).ready(function() {
nextAll behaves differently from nextUntil
On Jan 23, 12:34 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote:
Karl Swedberg schrieb:
Hi Volkan,
You could use John Resig's .nextUntil() method.
Not 100% sure, but afaik nextUntil is included in jQuery 1.2 as
Can you show the source of the selects, because the description is a
little confusing. You have array of selects? So multiple selects, but
only one has a value at any one time? Or do you have a multi-selection
select and hence you're trying to find the _options_ that are
selected?
On Jan 22,
Easiest way might be to purchase an IP lookup database and did it
yourself.
On Jan 18, 4:22 pm, timothytoe [EMAIL PROTECTED] wrote:
It's reasonably easy to get it down to a zipcode. But beyond that I
don't think it's possible. IPs are way too dynamic.
--tt
On Jan 17, 6:12 pm, Glen Lipka
and do an alert($address) I actually get a HTML div Object, not a data
array. Whats going on? This looks like it should be returning an array.
On Jan 16, 2008 7:23 PM, Hamish Campbell [EMAIL PROTECTED] wrote:
It's a great plugin - I'm using it (well, jmap2 actually) at
isat.deft.co.nz
Ah so, you learn something new everyday!
On Jan 16, 5:34 pm, fuzziman [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Remember that variables declared within functions only exist for that
function.
Not really...
As others mentioned, the crux of the problem is because setInterval is
What is the output when you fire this:
function loadJavascript(scriptFile) {
var scriptsPath;
// Builds the correct scripts path
scriptsPath = $('script').attr('src');
scriptsPath = scriptsPath.replace(/\w+\.js$/, '');
$.getScript(scriptsPath +
It's a great plugin - I'm using it (well, jmap2 actually) at
isat.deft.co.nz to integrate twitter and gmaps (currently a proof of
concept page only).
I believe I know where you're going wrong. By default, searchAddress
performs actions on the current map, rather than returning something
useful.
To make it check on change:
$('#mySelectId').change(function(){
if($(this).val().indexOf('someValue') != -1)
$('#someElement').hide();
});
On Jan 16, 12:30 pm, Wizzud [EMAIL PROTECTED] wrote:
var txt = $('theSelect :selected').text();
if(txt == 'cat' || txt.indexOf('c')==0 || ...test
The cause of problem 1 and 3 is that your functions are all nested
inside each other. You don't really need to check if they're visible
or not so you can dump the 'visible' checks. You could also change it
so rather than sliding up when you mouse out of the heading, it slides
when you mouseout of
The function 'force' belongs to the document.ready call, so as soon as
that's done 'force' is destroyed.
If you put it outside of the document.ready, the function exists
globally for all javascript in the page.
On Jan 16, 9:13 am, tlob [EMAIL PROTECTED] wrote:
hm... why? can you explain me in
Now the variable 'force' is global, the function will stick after
document.ready has completed and your code should work.
Hope this helps everyone out with other scoping issues :D
On Jan 16, 9:56 am, Hamish Campbell [EMAIL PROTECTED] wrote:
The function 'force' belongs to the document.ready call
Haven't tried it, but I think the issue is you're apply it to
_everything_ (*) that is not a header. That means the body, all
paragraphs, divs, spans etc. Ie, if you haven't specified a font for
headers explicitly, the headers will inherit the font from the body
(or a containing div, span, a
Hi all,
Thought I'd share a little piece of code I whipped up this morning.
This turns hr elements into pretty div based dividers. In action here:
http://www.deft.co.nz
Turn js on and off and compare!
In the HTML:
hr title=some text! /
In the JS:
$(document).ready(function(){
To clarify what Cesar said, the loading function _has_ finished
executing (ie, modifying the DOM). You need to preload any images
first so they don't have download it when the function fires.
eg: http://www.ilovejackdaniels.com/css/preloading-images-with-css/
On Jan 9, 8:40 am, Cesar Iduarte
What happens if you change:
$(p[class='+whichClass+']).show();});
to
$(p.'+whichClass+']).show();});
?
Or what about * selector:
http://docs.jquery.com/Selectors/attributeContains#attributevalue
//show any straggling, hidden p's with the right class
1 - 100 of 106 matches
Mail list logo