jquery

Reference anchor inside a td on click of this

Hello again, here is what i have: <td class="player"><a class="link" data-display="0" data-id="1" data-workdir="4">Image.jpg</a></td> Ok, and here is my jQuery: $(".player").click(function(){ alert($(this + " a.link").attr("data-display")); // Código para llamar al reproductor indicado $.post( "php/player.php", { display : $(...

jQuery keyUp/AJAX get combo always 1 or 2 strokes behind

I built a very simple Twitter Instant Search for fun, using jQuery and PHP. I bind an event to keyup on the search form, and make a quick AJAX call to a PHP page that curls Twitter Search JSON. <script> $(function(){ $('#search').bind('keyup', function(){ var v = $('#search').val(); console.log(v); $.get('ge...

Is there a clean HTML way to relate a key press to a dropdown item

I am working on an application in which I want to allow for quick data entry. So I want to make a date field selected by int month value (ie 7 = July). I think I only have 2 options. Prepend the number to the Month (1 -- Jan, 2 -- Feb, ... etc) but this is Ugly Use JS or jQuery to intercept key presses and select the appropriate mont...

Can I implment this with Wicket table components?

I have a below requirements, I would like to know how feasible it is to implement this with Wicket table components. A web page should contain a table initially with one row. On the bottom of the table there should be some links to add row in AJAX way(No page refresh) I should be able to clone a selected row when I click a link on the ...

Jquery mouseover mouseout menu using setTimeout

Can someone help me with this simple code.. I'm still a noob on js and I don't know what im doing wrong. Basically Im trying to make a mouseover menu. function showQuickLinks() { //show the menu } function hideQuickLinks() { //hides the menu } //button mouseover $("#quick-links-dd").mouseover(function() { showQuickLinks(); }); var m...

jQuery ajax not loading content into page

Im using PHP cURL to connect to another server, post data and return it to my page. It has worked up until now, this situation is a little different. I am using the following and it sucks. $(document).click(function() { $("#SymbolSearchForm").submit(function() { $.ajax({ url: "PHP/Kinetick_Symbol_Search.php", type: "post", dataType:...

HTML IDs turning out to be like intrusive javascript?

Hey everyone, take a look at the code below and appreciate how messy the id attributes are View File <?php foreach($array_project as $prj) : ?> <div id="prj-p<?=$item['project_id'] ?>"> <?php foreach($arr_skill as $skill) : ?> <h2><?=$skill['name'] ?></h2> <a class="view" id="skill-p<?=$prj['project_id'] ?>-s<?=s...

jQuery adding html to the results

my input array has: results[num_row] = { 'title': title, 'url': url, 'support_url': support_url, 'description': description, 'contacts': contacts }; I get the results back: function formatItem(item){ var highlight = $.Autocompleter.defaults.highlight; var temp = '<span class="title">' + highlight(item.title...

jquery toggle for different browsers

I'm trying to get the following jquery toggle to work on IE, FF, and as many browsers as possible, but currently it works only on FF. Here, I've got the toggle available (between drop-down select and textarea) only when a certain option is selected ("bbb" in this case). Also, is there a better way to write the same script (a cleaner way,...

jquery/javascript How to add image on top of column header

I am implementing a column re-ordering functionality for a grid. When I drag the column, I want to have an arrow in between column headers to give the user a feedback of where the new column would be placed. SOmething that we have in tab re-ordering in firefox. How do I add this image in between and on top of two column headers. Can I cr...

Is there any reason to ever use $.live over $.delegate?

I read in another question that you'd use live if there wasn't a container to attach the event to with $.delegate that you knew wasn't going away, but why not simply do: $('body').delegate('.myThing', 'click', function() { ... }); I've become fairly convinced that there's no reason to use $.live() in any new code and that its only sti...

Is there CSS sprites support in jQuery UI

I'm looking into using CSS sprites, but wouldn't like to invent the wheel. Is there existing support in jQuery or jQuery UI? Or as an alternative, a well debugged jQuery plugin ...

jquery ui dialogs and loading external content.

I have a list of pages that are dynamically generated with a echo statment. example: <a href="<?php echo $action['href']; ?>"><span onclick="jQuery('#category_edit_dialog').dialog('open'); return false"><?php echo $action['text']; ?></a> this is the code for making the jquery ui dialog window: $.ui.dialog.defaults.bgiframe = true; ...

slidetoggle, goes to top of page after selecting link

I have a div slide down when you click the link <a href="#" id="related-courses">Related Courses</a> <div id="related-courses-section"> <p>Content</p> </div> $('#related-courses').click(function() { $("#related-courses-section").slideToggle(100); }); CSS set to display:none; for #related-courses-section (to hide it by default) It...

jQuery Cannot set "selected"="selected" via attr() on <option> elements?

<select> <option>1</option> <option>2</option> <option class="test">3</option> </select> $('.test').attr('selected', 'selected');​ The select box above would choose the third option as default without any issues. However, if you check the elements with Firebug there isn't any selected="selected" attribute present within th...

jQuery - Clear textarea on focus

Im using a simple form with a textarea, when the users clicks onto the textarea I want the contents of the textarea to be cleared. Is this possible? ...

Extract cell index of clicked HTML table using jQuery - Please help!

Hello! I am looking for a way to do the following with a normal HTML table using jQuery. Extracting the index of the clicked cell and the index of the row it belongs too. Highlight the selected cell and remove the highlight when it is clicked again. Keep track of which cells that are selected so that I can save them into a database. ...

JQuery Map and JSON - Getting Sub Array Elements

I'm using JQuery to get city data from geonames. My problem is when I want to extract the value for sub-array items when using the JQuery map function. In this example, if I want to get the Wikipedia link, how could I do this? I tried: wikipedia: item.alternateNames.lang['link'] but didn't expect it would really work. Does anyone kn...

How append functionality to a click event with jQuery

I have an ASP.NET control that outputs a button to the screen and I have no way of modifying that button in the server side. The button renders with some functions in the onclick event and I need to disable the button after it has been clicked. I've decided to use jQuery and append the javascript to disable the button on the onclick e...

SCORM in lightbox/iframe gives an "empty" SCORM on Firefox browser

I'm trying to show a SCORM object into a lightbox-like plugin. I've tried few jquery scripts (topup, prettyPhoto) and squeezeBox for mootools. I can get the SCORM working only in Chrome and Safari but not in Firefox, where it shows only the left navigation bar. Any idea? ...