jquery

Traversing within single elements with jQuery.

Hi, I'm new to jQuery, coming from prototype. I'm trying to traverse within a form to do some validation before the form submits. There are multiple versions of the same form on the page, with css classes, but not individual IDs. Here is how I would do it in Prototype: $$(".validatedForm").each( function(form) { form.observe("subm...

Google Maps API: GClientGeocoder.getLatLng()

Hi guys, I'm using the jQuery plugin http://googlemaps.mayzes.org/ for Google Maps but have had trouble adding markers. Current setup: Show AJAX content in a thickbox, where a map is loaded. The map loads fine, and centers properly to a geocoded address. However, if you add a marker with a geocoded address the Google Maps API errors ...

facebook style comment bar

I am trying to create a comment box similar to facebook, where the text area expands and the comment button becomes visible when the text area is clicked and when the text area looses focus the comment button is hidden and the text area shrinks back to a smaller height. The following js works fine, but the problem is when I click the "co...

animate to coordinates instead of amount of distance

Is there a way to animate/slide a div to a particular set of x/y or just x coordinates? left:100 is moving by 100, not to X=100. I think anchors would be cool but I can't seem to figure how to say"move this div to x=100 and then later, "move this div to where x=-200" for instance. ...

How can I use $(this) inside of Fancybox's onComplete event?

I'm trying to use jQuery's $(this) inside of Fancybox's onComplete event, but I'm running into trouble. Here's my javascript code: $('a.iframe').fancybox({ centerOnScroll: true, onComplete: function(){ var self = $(this); var title = self.title; alert(title.text()); } }); I have simplified the code abo...

How do I use alert() for errors?

How do I alert() an error when my server code returns false? $("#editme1").editInPlace({ url: 'server.php', error_sink: function(editme1, errorString) { alert(errorString); } <----Maybe this? }); ...

The better way to use Jquery with Google maps API, change InfoWindow style

Hi Guys, I used to work with Jquery and Google maps API, and i've found some answers here, but i didn't found any workable examples. Please if you have one, or just give me a link. ...

How to create a progress bar

Hi, On a button click, I want to display a progress bar, When it completes 100% want to load something,For this stuff i want to use jQuery as well as css. I need some help, how to implement it. ...

jquery autocomplete needs to pull data

I am attempting to clone the functionality of google suggest. I have found google urls that return the the suggestions via json (google.com/complete/search?q=abc) I am already using jquery, so i would prefer to use code similar to this for the auto-complete http://docs.jquery.com/UI/Autocomplete the code that is lacking is the ajax t...

jQuery qTip callback not working

I have qTip being called on items within a table.. $('#orders_table a[rel]').each(function (){ $(this).click(function(){ return false; }); $(this).qtip({ content: { // Set the text to an image HTML string with the correct src URL to the loading imag...

How to echo an error if my server code returns false

What I want to do is alert() an error message to the user if my PHP script returns an error. Can someone tell me how to do this? ...

jquery option text selector problem

<select id="name"> <option value="1005">peter</option> <option value="2056" selected="selected">shan</option> </select> how to set option's text=peter selected? like this $('#name option[text=peter]').attr('selected',true); ...

Link inside span with display: none; style is visible

So I am using jquery ui dialog like this: $(document).ready(function() { // vytvorenie kurzu $('a.openModalBox').click(function(e) { var href = $(this).attr('href'); if ('#/' == href) { e.preventDefault(); $('span.modalBoxContent').dialog({ modal: true, res...

Why i am unable to bind a method on onClick event of div?

I am trying to create div elements dynamically, and at the time of creation i am using onClick = 'showDimension();'. It shows the correct html on alert box but when DIV is created you can see that div is not having any onClick method attached [ firebug ]. Instead of that it is having a stray string 'showDimension();'. Why it is happening...

jquery ui dialog messed up if HTML is inside

So here is my HTML: <a href="#/" class="next openModalBox lessOpacity">Posunúť sa dopredu</a> <div id="modalBoxContent"> <p style="font-size: .8em; text-align: center;"> Úspešne ste absolvovali študijnú časť školenia. Pre ukončenie školenia je potrebné úspešne absolvovať <a href="/index/index" class="accessible-link">záv...

jquery select box will not move!

This plugin has been giving me hell! :/ I finally got it to work, but now when I try and position the select box it won't move! Well... I got the box to move but the dropdown menu stays there. It is really annoying! 1000 internetz to someone who can help me:/ elektrikhost.com is the site, look where the domain search is. When I place t...

Jquery - Document click disables postbacks ?

Hi, i have a div to show when i pressed a button and hide when i pressed anywhere. jQuery(document).ready(function () { $(document).click(function (e) { if (e.button == 0) { $('#DivToHide').hide(); } }); //If its own, return $('#DivToHide').click(function () { return false; }); ...

if i keep javascript at bottom or keep javascript in <head> inside document.ready, are both same thing?

if i keep javascript at bottom or keep javascript in <head> inside document.ready, are both same thing? I'm confused between these two methodology this http://api.jquery.com/ready/ and this http://developer.yahoo.com/performance/rules.html#js_bottom Is there any benefit to put js at bottom (just before </body>) even I'm keeping the co...

fullCalendar - Event title and detail

Hello I'm using the pretty fullCalendar jQuery plugin. I'd like to be able to have a title AND a detail on each event as in the screenshot below: Here the details are the participants for each session. (overflow hidden on the detail) ...

jQuery: getting the nth position of an object

Hi, I have a div that contains checkboxes. I also have a function that accepts a jquery object parameter. It looks like this: function analyze_checkbox(cb) { ... } Given this, is there a straightforward way to know the child position of the cb parameter? I was thinking of something like this: cb.parent().index(cb) What is the prop...