jquery

Text blinking jQuery

What is an easy way to make text blinking in jQuery and a way to stop it? Must work for IE, FF and Chrome. Thanks ...

Transform string into image with JQuery

Another JQuery question for you guys. Say I have a url of an image in my web page surrounded by square brackets. [http://www.example.com/picture.jpg] How could I, with JQuery transform that string like so... [http://www.example.com/picture.jpg] into... <img src="http://www.example.com/picture.jpg" /> ? ...

Stopping jQuery Jumping to Newly Loaded Content.

I have a div with is replaced upon certain user actions. These actions are performed under the div that is being replaced and in the case that the div is too large to fit completely into the view window, along with the buttons used to change it underneath, the browser will jump to the top of the newly loaded div. Which is annoying. Doe...

Is there a peformance difference between jquery selector or a variable

Lately i have been wondering if there is a performance difference between repeating the selector just over and over again or just using a var and store the selector in that and just refer to it. $('#Element').dothis(); $('#Element').dothat(); $('#Element').find('a').dothat(); or just var Object = $('#Element'); Object.dothis(); O...

Using javascript substring() to create a read more link

Hi there, I'm developing a Classic ASP page that pulls some content from a database and creates a Read more link after the first 100 characters as follows; <div class="contentdetail"><%=StripHTML(rspropertyresults.Fields.Item("ContentDetails").Value)%></div> <script type="text/javascript"> $(function() { var cutoff = 200; ...

jquery : dynamically assigning div height

I have a div with class "divItemclass" .for this class, i have put height as auto.This div contains some data(text/ images ) .Now i want to change the class to another class when user clicks on the delete button. I am using the below code to do so $("#divRoundItem").removeClass().addClass("divGlowToDelete").fadeIn(500); and in my css ...

How to aceess span directly using jQuery

Hi All, I want to know how to get access of this [span class="myclass"] in below html structure.. <ul> <li class="first"> <span class="myclass"></span> <div class="xx"> <span></span> ........ </div> <li > <span class="myclass"></span> <div class="xx"> <span></spa...

JQuery change text to input

Hey guys, I have a table setup like below: <table> <tr> <td class="url"> <a href="http://www.domainname.com/page1.html" /> </td> </tr> <tr> <td class="url"> <a href="http://www.domainname.com/page2.html" /> </td> </tr> <tr> <td class="url"> <a href="http://www.domainname.com/page3.html...

Jquery .val() for input only works once.

I'm trying to create a chat box for my game. The user type's their chat into the input:text feild and by ither pressing Enter or clicking the button submits the chat text. This all works, however for some reason after the first time a user submits a chat message it fails to get the text from the input field. Here is my code. $(docume...

Are there any getter jQuerys CSS translation?

Hi all, jQuery's cross browser support is amazing. However I was wondering whether the following script will work in any browser or not. $("#block1").css('background','blue'); $("#block2").css('backgroundColor', '#0000ff'); $("#block3").css('background-color', 'rgb(0, 0, 255)'); if ( $("#block1").css('background-color') == $("#block2"...

How to get innerhtml value in mozilla

Hi, I have below html code <div id="divTest"> Hello <input type="text" id="txtID" value="" /> <input type="button" onclick="getForm();" value="Click" /> </div> And I have below javascript function to get innerHtml value <script language="javascript" type="text/javascript"> function getForm() { var obj =...

jQuery, Uncaught TypeError

Hi, I have some javascript code on my webpage that is loading some divs onto the page. I also want to add onmouseenter, and onmouseleave event handlers to each div. I am using jquery to add these handlers, but i get the error: "Prpoerty '$' of object [object DOMWindow] is not a function" My code looks like this, it is in a for loop: ...

inner span is not getting ref in jQuery.Why?

Dear All, I have one html structure: enter code here <ul> <li><span>aaa</span> <div> <ul> <li><span>bbb</span> </li> </ul> </div> </li> <li><span>ccc</span> <div> <ul> <li><span>ddd</span> </li> </ul> </div> </...

jQuery UI datetimepicker and ASP.NET CompareValidator for DataTypeCheck

I'm using an ASP.NET textbox with the jQuery UI datepicker. The textbox allows edits so that the user can enter a date manually or clear an existing entry. I added a CompareValidator to perform a data type check on the textbox and this causes an error after selecting a date with the datepicker. The error occurs in the ASP.NET client side...

CSS Error when using jQuery's gt() selector?

I've noticed that Firefox throws me a warning on the following jQuery code: $("li.example div.code:gt(4)").hide(); CSS Error: Unknown pseudo-class or pseudo-element 'gt'. According to jQuery, it all should be correct. And it works, but I wonder how to fix this error for cleanness sake. ...

jqgrid question

Do you consider jqgrid being a good solution since you cannot set its width in percent and only in pixels? Are there any alternatives? Thank you. ...

Problem Calling WCF Service Library from jQuery

I have a WCF Service Library exposed through my ASPX site as follows [System.ServiceModel.OperationContract] [System.ServiceModel.Web.WebInvoke( Method= "POST", RequestFormat=System.ServiceModel.Web. WebMessageFormat .Json, ResponseFormat=System.ServiceModel.Web.WebMessageFormat .Json)] LogonResponse Logon(LogonRequest logonRequest); ...

check box enable in Jquery

<tr id="tr99"><td>......</td></tr> <input type="checkbox" onclick="toggletr(this);" value="val" id="cbox" /> The javascript: $(document).ready(function() { function toggletr(obj) { if(obj.checked) $(#tr99).hide(); else $(#tr99).show(); } hi.this is my code that runs in add page of staff. if user is ...

How to parse JSON array in jQuery?

EDIT I checked the jQuery documentation and using $.ajax with the json datatype specified returns an evaluated javascript object, so eval() isn't the answer here. I knew that anyway, since I am able to parse single JSON objects, just not arrays. The problem is the $.each-ing my way through them :) I have followed the syntax for parsin...

Two DOM classes run same javascript class, messing up click functionality?

I've got about 20 on/off switches that sends an ajax request which updates a field in a table. I've duplicated where the class attaches to the selector because i need to be able to designate which switches are on or off. However, the first button i click on works, but after that, i sometimes need to click once for some of the other butto...