jquery

Remove a specifc inline style with Javascript|jQuery

Hello, I have the folowing code in my html: <p id='foo' style='text-align:center; font-size:14pt; font-family:verdana; color:red'>hello world</p> and that in my external css: #foo{ font-size:11pt; font-family:arial; color:#000; } I want to remove all "font-size" and "font-family" in the "style" atribute, but not the "color" and oth...

jQuery: Move attributes between elements

Hello! I have this HTML markup <a href="#" title=""> <img src="#" title="image1" /> </a> <a href="#" title=""> <img src="#" title="image2" /> </a> <a href="#" title=""> <img src="#" title="image3" /> </a> and I need to take the title of each image and put it on their "a". I tried to do it with this function $(function(...

How can I disabled/enable multiple buttons using jQuery

I'm using the following script to move a <tr> from any position in a table to the top of that table. This happens after an ajax form is submitted. The form's--not the button's--class is "top" $(".top").click(function() { var thisRow = $(this).parent().parent(); var firstRow = thisRow.parent().find("tr:first").not(thisRow); t...

Web browser plugin for jquery performance optimization

Attempting to improve the perforance of my jquery - so step 1 for me is to optimize my selectors. I have been using jsperf.com which has been helpful but is there any web browser plugin that I can use that will do similar as jsperf? ie. I can enter several different selectors and it tell me which is the slowest etc or the timing each sel...

return folders from url

I am looking to write a piece of javascript that will do the following: Look at current url and return any folders in the url ie: http://localhost/folder1/page.aspx returns -> /folder1/ http://localhost/page.aspx returns -> / Any help? ...

insert content to already inserted content

Hi all, well, I'm stuck and hope that you can help. I created a text-example and put it to the end of the post. Thank you in advance. On a site there are e.g. 50 entries - like comments. Some p-elements in some of those entries are containing a special text. This is just a snippet how I get the special text. $("p:contains('special tex...

Feeding multi-line string value to jquery methods

How do I feed string variable holding multiline value in it to jquery method like prepend? I need it to construct a form pass by drupal search module like - $('#divsearch').prepend('<?php print $search_box; ?>'). Thanks a bunch. ...

Loking for some good and simple jquery tutorials

The title say says it all. I want something that's simple, in-depth and explains from basics. ...

JQUERY autocomplete and asp.NET

Hi, how can i use this script: http://www.pengoworks.com/workshop/jquery/autocomplete.htm with a web service? Thanks! ...

Turn image SRC into background-image in jQuery

http://stackoverflow.com/questions/2183347/how-to-set-the-image-src-using-jquery I am looking to do the opposite of what this jQuery snippet does. I need a bit of code that will turn <img src="images/filename.jpg"> to become <div class="imageBox" style="background:url(images/filename.jpg)"></div> I've searched up and down trying...

How to pass the JQuery "this" selector as a parameter

For a class, I have to make a Drag and Drop interface using only CSS, HTML 4.01, and Javascript with the JQuery library; no plugins allowed. I figure the best way to do this was aler the CSS position of the div I'm supposed to drag on mousedown and then on mouseup $(document).ready(function(){ $(".draggable").mousedown(Dragging(thi...

Problem with JS jQuery AJAX

Hi all, i have a problem with my code. function fnFormatDetails ( oTable, nTr ) { var aData = oTable.fnGetData( nTr ); var sOut = ""; var ajax = $.ajax({ url: "/wemi/mediaplaner/show?id="+aData[1], success: function(data) { //return data; //return sOut = data; //con...

Removing a specific li

<li class="checkinUserPhotoImageContainer" id=""> <img src="<%=checkin_image['image_url']%>"/> <span class="delChkPhotoImgOut"> <span class="delChkPhotoImg"></span> </span> </li> <li class="checkinUserPhotoImageContainer" id=""> <img src="<%=checkin_image['image_url']%>"/> <span class="delChkPhotoImgOut"> ...

Checking all sub-checkboxes and un-checking

How can I use a parent checkbox to check and un-check all child checkboxes. E.g. Checkbox ID = 1 Child Checkbox ID = 1-1 Child Checkbox ID = 1-2 Grand-child Checkbox ID = 1-2-1 Grand-child Checkbox ID = 1-2-2 The code I've written so far uses the hat character ^ to check all checkboxes ...

How to signup to run a code after the name/method has been defined using jQuery?

I am trying to run a code but I get $.uniform is undefined [Break on this error] $.uniform.restore("#f_variedbyoperator"); How can I use jQuery, to detect if .uniform has been defined? And to signup the code to run after that. ...

JQuery UI Click call works on local machine but not when published to server - also using CakePHP

I have some javascript that looks like this: $('.resultitem').click(function(event){ alert('check this gets called'); location.href='viewinfo/'+$(this).attr('rel'); }); this code works fine on my local machine but after uploading to the server it doesn't seem to get called at all. Can anybody help me un...

Sharing DB Connections and already loaded scripts, styles on JSP Page

Hello everyone, I am currently trying to code our existing desktop application in JSP. To be able to maintain sustainability, have visual effects and get functionality, I have decided to use JQuery. After starting to code a month ago, we now realized that these pages are bringing a heavy usage of libraries (JQuery and JQueryUI librar...

Javascript in Safari not always running

Hey Guys, Am having an issue with Safari. I have a basic script using jQuery that makes some changes to a form field and adds some behaviours to it. When I run this script on using the document ready method it's fine in Firefox but in Safari it doesn't always run the initial changes. I can hit refresh and get it running fine 4/5 times, ...

Serialize inputs in table rows (jQuery)

I have a table with multiple rows which contain form inputs (checkboxes, text, dropdowns). When I click save I want to be able to get JSON representing each table row which will be used in an AJAX request. Each row has an id on it so I would like to get back something like this: [1: { "input_name":"input_value", "input_name":"input_valu...

$.cookie is not a function

When I try to load my page that uses jquery, when the following line is hit: if ($.cookie('compare') != null) I get the error $.cookie is not a function. Has anybody seen this before? ...