jquery

Check if an element is empty after using .append

I want to check if a table body (tbody) is empty using jQuery. So far I've tried something like: $("#searchTable tbody").is(":empty") But it doesn't work. Any other ideas? HTML Sample <table id="searchTable"cellpadding="0" cellspacing="0" width="100%" > <thead><tr> <th>No.</th> <th><a href="#">Status</a></th> <th><a href="#" class="...

how to stop script tags from being evaluated when inserted in the DOM using jquery ajax or post

how to stop evaluating script tags in jquery ajax and post responses? Please find the corresponding code below.The function sendForm() is being evaluated even when i am using dataType : 'text' <HTML> <HEAD> <TITLE>This is the title</TITLE> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javasc...

How to find what ActiveX control is referred on a web page?

I have developed a web application (ASP.NET Web Forms). One of my customer has very restrictive policies. When he accesses the web page, IE shows this message: Your security settings do not allow Web sites to use ActiveX controls installed on your computer. This page may not display correctly. As far as I know, we don't use ActiveX con...

"What Tag did I select?" in jquery

Let's say I do something stupid like this: <div class="my_class">fun wee!!</div> <span class="my_class"><b class="my_class">Title</b></span> <p class="my_class">Client</p> <Script> $('.my_class').click(function() { alert('You clicked a ??????? Tag!!'); }); </script> Where I have selected lots of different tags with the same selec...

jquery slider vertically is not working

hi i have made a vertical slider using the jquery to slide the text vertically. The text does move up and down when the handle of slider is moved but the handle itself is not moving ... i dont know what is going on out there?? Please somebody help me out!!! Here is the code: JS: $(document).ready(function(){ $("#content-slider").s...

Using JavaScript/jQuery to return a list of CSS selectors based on highlighted text

I've been given some project requirements that involve (ideally) returning a list of CSS selectors based on highlighted text. In other words, a user could do something like this on a page: Click a button to indicate that their next text selection should be recorded. Highlight some text on the page. See a generated list of CSS selector...

jquery show hide issue with non block elements

I am trying to show/hide a users twitter feed when the icon is clicked on. The issue is that my markup looks like this: <a href="#"><img src='images/twitter.png' id='twitterImg' /></a> <span id='twitter_msg'><? include('PHP/twitterJSON.php'); ?></span> And my jquery uses the slideToggle() $('#twitterImg').click(function() { $('#twitt...

Sum value of elements inside of a div using jquery

I'm doing a sorting of a set of users, I have 4 groupings like so (2 shown): <div id="team1" class="groupWrapper"> <div id="p1" class="groupItem"><div class="itemHeader"><div class="first">John</div><div class="skill">15</div></div></div> <div id="p2" class="groupItem"><div class="itemHeader"><div class="first">Luke</div><div class=...

How to update sql query dynamically - jquery

Hello, I am trying to figure out how I can update my sql query dynamically. On the main page, I have a pagination script that counts how many pages there will be: <?php function generate_pagination($sql) { include_once('config.php'); $per_page = 3; //Calculating no of pages $result = mysql_query($sql); $count = mysql_num_row...

How can I use the jQuery $.ajax function to stop or allow a form submit?

$('#post_form').submit(function() { $("#ajax_bar_loader").show(); $.ajax({ url: 'add.html', data: $('#post_form').serialize(), dataType: 'json', type: 'post', success: function( result ) { retVal = formCheck( result ); } }); return false; }); That's what my co...

Need to copy the text inside an <a> tag and move it inside a specific <div>

I have this piece of code: <li class="selected"><a href="/AmIACandidate.html">Am I a Candidate?</a></li> I need to grab the text "Am I a Candidate?" from inside the tag and move it inside a specific div tag. <div id="sideNavHeader"> --Copy needs to go here-- </div> I can copy the whole but can't seem to figure out how to grab j...

Javascript function execution on link click?

Hi there, I have a link, that when a user clicks on it, it loads a different page as normal but also executes a JS function that autofills a specific text-box on that different page. Is it better practice to use Jquery or Javascript to do this? How can I do this using either one of them? ...

jQuery - datatables, how to get column id

How to get a column id in datatable plugin for jquery I need column id for the update in database. ...

jQuery Ajax and ColdFusion

I am attempting to submit a querystring to a ColdFusion page. I would like the ColdFusion page to return true or false based on whether the login in successful. When my login button is clicked: function AttemptLogin(userName, password) { $.ajax({ url: 'login.cfc&user=' + userName + '&' + 'password=' + pass...

Is there a difference between $().ready() and $(document).ready()

I've seen some code where they just do this: $().ready(function() { ... }); This is shorter than doing a document selector but is it the same thing? ...

Anyone have any good resources on using client validation with MVC2 and jQuery?

Does anyone have any good tutorials on using the client-validation with MVC2 and jQuery? ...

html tables. Sync column spacing between 2 tables;

I have 2 tables in separate <div>'s. One is the header and the other is the actual data which is scrollable. The issue is that they don't line up. I'm using jQuery and the tables are in a re-sizable area so i don't want to set static column widths. What can I do? ...

Store JsTree order back into database

Hi I am using JsTree and got some of it working with my database. Such as deleting a node, renaming a node, etc. I am having problems with saving the ROOT folders order back to the database. When I move the root folders, it doesnt save order. When I move the sub folders around, it saves order fine. Anyone know what I am doing wrong? I ...

Is there a jQuery script to display Twitter feed with auto-refresh?

This question may be for someone familiar with creating pipes in Yahoo! Pipes. But I'm looking for a jQuery script that will display 4 tweets that will drop down automatically every 5 seconds when new tweets are posted AND that ends in a specific hash tag. It'd be great too if I could filter out bad words. Know of any scripts out ther...

Jquery difference between searching 'children' and 'find'

When is one preferred over the other when searching for nested DIvs? ...