jquery

jquery ui bottonset() doesnt work

Hi all. Im trying to widgetize a group of radio buttons with jquery ui. jquery and jquery-ui is loaded from googleapis. I've uploaded a ui theme and included the css file in the header. This is how I call the buttonset function: <script type="text/javascript"> $(function() { $("#color").buttonset(); }); </script> And this is the...

Vertical Toolbar like Menu using JQuery with Drag and Drop

Hello - I'm trying to build a vertical menu which has options like open, save, print, email and other options. I want this menu to be movable and any one of these icons to be dragged to container. I have looked at Jquery UI but I am looking for some menu example which has the css for this menu with these icons. Any help will be very ...

jquery ajax response empty

I've run into a difficult issue with ajax. I've got 2 files. 1 file calls the other, using the .ajax api. So far I have no issues. The problem I'm running into is due to how I return a response to the ajax, from the 2nd file. Usually I use the php "return" function. Which then lets me decide what to do with that text. However, I re...

Persisting div toggle state with cookies

Hello, Using the code sample below, how could I utilize the jquery cookie plugin so that the toggle state of each div element persist beyond the browser session. Thanks. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery...

javascript string manipulation

I have a long string with Headers and Sub-headers. Every header is supposed to have a sub header, but the string pre-processing, does not. I need to manipulate it in such a way that every header has a Sub-header. Every header that does not have a string has a reference point under different header. The header missing the subheader need...

Insert html via .before() jquery

Right i'm trying to insert some basic html before a div like this <script>$("div#header").before("<div class="test">test</div>");</script> However nothing appears, but when i try the jquery example <script>$("p").before("<b>Hello</b>");</script> it works, what i'm i doing wrong? Thanks ...

Anchor animate div based on offset of element

What I am trying to do is create a list of anchors that will animate a div full of images based on the offset of that image. #a-one should animate ul#gallery based on the offset of #img-one.box. #a-two should animate the ul#gallery based on the offset of #img-two.box. So if ul#gallery is left: 0 and #img-two.box is at 300px. Then whe...

Why does my jquery var work when I place it at the end of the code and not at the beginning?

I'm incredibly new to jQuery and am wondering if my code will work when deployed to the world and not tested locally. I have a pretty substantial block of code that populates some form elements among (several) other things. When I place this code into the top of my script just after the document ready portion, it doesn't work. If I pla...

Alternatives to jquery hide()/show()?

Hi, I am trying to hide an element in my page (it is a youtube player instance). When I use jquery's hide() method, the player gets a bit wonky, in that it stops responding, even after I call .show() again. Is there another variant on hide(), maybe something like .opacity(0), or .visibility('none') that I can use? I don't mind the play...

Get the selected element's HTML Tag in JavaScript

I know you can do this, but every time I Google it I get how to select all elements of a certain tag. So, e.g.: alert($('#my-wrapper').someJSMethod()); {...} <div id="my-wrapper"></div> Would alert "DIV" actually. I'm selecting elements with jQuery by the way. ...

Can this Flash tool be done with JavaScript (jQuery)/HTML5/CSS3?

This is a tool which builds a bicycle visually from components the user selects. What do you think, can this be done with HTML5/JavaScript (jQuery)/CSS3? What do I need to know to start? What do you think the trickier parts will be? http://www.hotcards.com/bikes_102/bikes.html ...

jQuery Table manipulation

Trying to manipulate a table with jQuery, and I just cannot seem to get it to work properly. The empty works just fine, but I cannot add content back onto the table after. Any suggestions on what I may be doing wrong? <table id="schedualtable"> <tbody id="sortable"> <tr><td></td></tr> </tbody> </table> $('#schedualtabl...

Facebook type popup drop down lists recreate (image attached)

Hello , Was hoping someone could point me in the right direction, perhaps to a tutorial on how to create these popup drop down lists like facebooks who liked this link.. I'm assuming its jquery? Any ideas guys? ...

jCarousel - Vertical Thumbnail Columns Are Advancing Too Far

Though I was able to get the ul.jquery-vertical-column to cut itself in half, it seems like the next button is still advancing the thumbnails using the full height of the list. Here is what I've modified in jquery.jcarousel.js so far: if (li.size() > 0) { var wh = 0, i = this.options.offset; li.each(function() { ...

In jQuery, how does prepend() work on a children() function?

I am a little confused on how prepend acts towards a children function. image.canvas.children('.image-pinpoint-view').prepend(this.area); where would this.area appear? ...

jQuery: how to pass event metadata on HTML elements while maintaining XHTML validity?

I'm sure a lot of you have come across this dilemma at one time or another: I have a block-level HTML element that contains multiple block-level and inline-level elements, e.g. <div id="ajax"> <h2>Something</h2> <div class="icon"></div> <div class="clear"></div> <div class="somethingelse"><h3>blah</h3></div> </div> I simp...

Best way to display part of image defined by x+y coordinates?

So, I have a load of database entries, each with an associated image file, and X and Y coordinates indicating which particular part of the image file it relates to. See the image and x1/y1/x2/y2 columns below | idx | code | ref | imagesub | image | x1 | y1 | x2 | y2 | -------+--------+------------+----------+-----...

JQUery looping through each table row

Hello, I have the following table structure <table class="ms-listviewtable> <tr> <td class="ms-vb2-icon"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2">test1</td> </tr> <tr> <td class="ms-vb2-icon"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb2"/> <td class="ms-vb...

How to use jQuery to download zip file which directly ouput from server?

I have a php script that will generate zip file. header("Content-type: application/octet-stream"); header("Content-disposition: attachment; filename=random_name.zip"); echo $zipfile->file(); The filename is random and the server script doesn't even come with a return-file-uri function. So my question is that how jQuery can handle thi...

SImple class-based jquery show/hide for multiple, independent instances?

Is there a way to have many, many instances of jquery-based show/hide (toggle link followed by container with hidden content; toggle text changes depending on state) on a page using only classes and not IDs? I haven't found a reasonably well-documented, functional example anywhere. Thanks for any and all help! --cg ...