jquery-selectors

Html generate data and print from another page

In the below code, in a.html there is this code as, <div id="tableview"></div>//Data loaded dynamically <input type="button" id="printbtn" onclick="print()"/> <script> function print() { var data=$('#tableview').html(); dataobj.print(); } In ...

jquery load function for small preview

Preview:          In the following div i need to show a very small preview of a page.In order to do that what should be the css set to, When i use the following code below,the preview is very big.I need to show the preview with the size of the videos on you tube(as In suggestions tab) var url="/tools/display/" + param; $('#preview').c...

Generating thumbnails using jquery or javascript

All, Can any 1 of you show a small piece of code for generating a thumbnail of any website using javascript or jquery, I had posted earlier but couldnt find any right match for my requirements. <div id="generate_thumbnail" onclick ="generate();"> //Show thumbnail within this div </div> <Script> function generate() { ...

jQuery Not Selector and Live Binding

I am trying to bind all of the a elements on a page except for those with the title attribute of on. The code below ends up not attaching the click event to any of the a elements on the page. If I remove the not it works but of course binds to a elements I do not want the code applied to. What am I doing wrong with the not selector? $(d...

How to delete the first child of an element but referenced by $(this) in Jquery?

The scenario is I have two Divs one is where I select items (divResults) and it goes to the next div (divSelectedContacts). When I select it I place a tick mark next to it. What I want to do is when I select it again I want to remove the tick mark and also remove the element from divSelectedContacts. Here is the code. $("#divResult...

how to use trigger in Jquery to pass parameter data as well as control (this)

I am trying to use same validation funtion for all my controls. But I dont know much in jquery and not been able to pass event handler to the trigger. I want to pass textbox id to my custom function. How can i do this <script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(document...

jQuery filter() - filtering on multiple attributes

I want to filter based on two attributes, the first is id and the second is called level i.e. id="someId" level="someLevel" Shouldn't this code do the trick ... it doesn't seem to work. $(".someClass").filter("#"+id, "[level='"+level+"']").someAction(); ...

Retrieving ids of chid divs using jquery?

Hello, Please have a look on the code below .. <div id="click_me">Save</div> <div id="blocks_sortable"> <div id="block_1"> <h2>Block 1</h2> <div class="items_sortable connectedSortable"> <div id="item_1"> <span>Item 1</span></div> <div id="item_2"> ...

jQuery Selectors: how to access an a tag, whose span has a specific class?

I'm messing around with FullCalendar jQuery calendar, and qTips, so that I can display more information about the event upon mouseover. I've added a summary element to the FullCalendar js, and also my server code. I then added a new qTip in the eventMouseover method, based on the span class, which works prefectly. However, if the even...

What does this JavaScript error mean?

Using the “Venkman” JavaScript debugger for Mozilla and getting the following error: XML Parsing Error: not well-formed Location: x-jsd:source?location=http%3A%2F%2F192.168.1.150%2Fscript.js&instance=337 Line Number 557, Column 50:<line><margin x='t'> - </margin><num> 554</num> �� valid = false;</line> Functions works b...

How do I use jQuery to omit the "Select All" check box from the list of elements sent to the server?

When the "Select All" check box is used, it also sends that check box and it's value to the server. How do I remove or omit it from the node list before sending it to the server using jQuery? Thank You. ...

Focusing a textarea

Int he below code a textarea is added 6 times and initially the textarea conatins the text Enter Text. My question is, if the user enters data in first and third textareas. How to give alert to the user saying that the "textareas are empty" this is a general message but focus on the 2nd textarea and when the user enters data in 2nd the ...

How to set dropdown list by another dropdown list

I have two dropdown list (let's say there ids are ddl1 and ddl2). How can I set dropdown list 1 (ddl1) equals dropdown list 2 (ddl2) in jQuery? Something like: $('#ddl1').val()=$('#ddl2).val() Thanks in advance. ...

jquery ajax, array and json

I am trying to log some input values into an array via jquery and then use those to run a method server side and get the data returned as JSON. The HTML looks like this, <div class="segment"> <div class="label"> <label>Choose region: </label> </div> <div class="column w190"> ...

jquery child selector problems

I have a basic website nav layout that looks like this: <li class="folder parent_folder"> <a href="#">Some Folder</a> <ul class="submenu"> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file">...

jQuery .attr() crashing Internet Explorer

Hello everyone, This is my first time posting a question here, as I usually try to find solutions myself. This one, though, being an IE issue, just drives me crazy. I use jQuery cycle plug-in on a website I made and, to populate a caption div, I use a little function that is called after the image is loaded, which uses the "alt" attrib...

Perform jQuery selection on ajaxed html content

Is it possible to load an html document using ajax and then perform a jquery selection on the loaded html? I want to perform a search against a remote search server and then use the results to reformat an existing page. EDIT: the find function doesnt seem to return results (length is always 0). Here is the sample html <html xmlns="ht...

jQuery - How to select elements that do NOT have a class?

How do I get elements that do not have any class names? <td class="B A">A03<sub>reserved</sub></td> <td class="B R">R70</td> <td>105</td> <td class="M C">L220</td> Right now I'm doing this $('td').not('.A, .B, .C, .M, .R') There's gotta be a better way! ...

jQuery selector for <div> which does not contain <img>?

How do I select all <div> elements which do not contain any <img> elements using jQuery? ...

jquery :last missing multiple classes

I have an unordered list, and am using jquery to find the last ul and apply a class. jQuery("ul.class1:last").addClass("lastUi"); The html is as follows: <ul class="class1"></ul> <ul class="class1"></ul> This is working fine, however it has now changed in that another class is being added to the list so the html looks like: <ul cl...