jquery

How to convert Jquery.serialize() data to JSON object?

Is there any better solution to convert a form data that is already serialized by jQuery function serialize(), when the form contains multiple input Array fields. I want to be able to convert the form data in to a JSON object to recreate some other informative tables. So tell me a better way to get the serialize string converted as a JSO...

Javascript: getting location.search out of any url?

hey guys, i know top.location.search retruns ?key=anything&blabla=foobar of my current url. I wonder how i can get the search value out of any url? if I have e.g. $goToURL = 'http://www.anydomain.com/hello/?path=xyz how can i get ?path=xyz out there and save it to a variable? regards matt ...

How to make a select field show list of options? - Javascript/jQuery

Hi folks, I'm trying to mimic focus on a select field. e.g. When a user gains focus on a select field, the select field shows the options in a drop down list. When using $('select').focus(), the options are not shown. Any help on this one guys? =) ...

jQuery/JavaScript validation controls

Hi, I have a form on a sharepoint site and want some fields to be required fields (datetime picker etc.). To make some other fields visible/hidden and also add a red * after required field titles I use (example) : //Strategic Priority $('nobr:contains("Strategic Priority")').closest('tr').show(); $('nobr:contains("Strategic Priority")'...

jQuery changing the location based on the html

Ok, so I have this ul listed below and the buy now link under it that currently goes to /two_hours. I want it to change the location based on what is clicked. For example if I click the 4 hour button i want the url to the buy now button to go to four_hours and so on. Here is my jQuery so far: $(function () { $('.box-ul .btn .dot').c...

How can I rotateY an element without dipping underneath the page in 3d space?

I'm attempting to achieve a CSS 3 effect where when you click on an image in a bank of images, it expands to all the available area and flips over at the same time. The way I was able to accomplish this was to clone the element and absolutely position it on top of the original then transform that. In the code below the cloned image is a...

Jquery form validation style

I'm using Jquery's form validation plugin. I wanna display validation error messages inside the fields that are invalids. For example, if the email field is invalid, I wanna clear its content and display the message above it. I say above, 'coz there's no need to change the content to the error message. How is that? ...

Select a specific character in a string and offset it (visually) with Jquery

Hi I'm trying to use Jquery/Javascript to mimic a broken typewriter font (since I could not find one). But I want to make it random which letter gets broken. I was able to split the string of the id that I wanted and use a bit of code I found to get a random number between 0 and the total length of the string. What I'm having proble...

Refresh draggable containment

Hi Guys I have a draggable element that has containment set as parent. This works great but the div content can change making it taller. Is there anyway to trigger the drag event that will ensure it doesnt move from inside its parent. As right now it can overlap the parent until it is dragged then the containment kicks in. Best Regards...

Looking for a jQuery plugin that is like jQuery Highlighter, jQuery Tools Expose and js_tutorial

I am trying to create a tutorial for a form and I have found many great plugins that almost do what I want. If all else fails, I will hack it together, but I first want to see if there is anything out there which is similar to what I am looking for. I like jQuery Tools Expose http://flowplayer.org/tools/toolbox/expose.html I like jQue...

Not seeing line breaks in CSS code .load()ed via jQuery

I am using jQuery to .load() the contents of a CSS file into a div. But when the contents of that file are loaded, all the line breaks, tabs, etc. are gone. Is there a way to do a load of a css file while still preserving the line breaks? Thanks in advance! ...

Jquery not defined timing issues

I am including jQuery in the head of a personal site. I also included an external js file right after it that uses jQuery. <script language="javascript" src="../js/jquery-1.4.2.min.js"></script> <script language="javascript" src="../js/global.js"></script> global.js merely contains the following: $(".nav-item").hover(function(){ ...

ckeditor turn off enter key

I am trying to use ckeditor to edit single lines so I don't want users to be able to use the enter key. Does anyone know how to stop the enter key from being used? I tried $("#text").keypress(function(event){ alert(event.keyCode); }); But it didn't register. Thanks for any help. ...

How do I populate the AjaxControlToolkit combo box with JQuery using a webservice

Is it possible to populate the AjaxControlToolkit ComboBox with jQuery using a webservice. I want to do this to get away with update panels containing large response data. With this I also want to get the selected data in code behind. ...

Given an ID, find and replace the last sentence with a span wrapper

Given the following: <div id="bigchuck"> <p>blah blah blah.</p> <p>yada yada yada.</p> <p>Tada. Bing bong the witch is dead. Door bell.</p> </div> How can JavaScript/JQUERY find the last sentence "Door bell" and wrap it with a tag, to result in: <div id="bigchuck"> <p>blah blah blah.</p> <p>yada yada yada.</p> <p>Tada. Bing bo...

Creating AJAX Rich Mobile Site?

I'm thinking about creating a mobile website that's rich in AJAX and Jquery functionality. So from the phone, a user can experience capabilities such as: drag and drop, "loading..." images, dialogs that fade in and fade out, drop shadow dialog boxes, dynamic resizing of dialogs etc... When the mobile website first loads, it will probab...

Jquery remove link with a certain label and the whole text after this link

For example: <a href="/" title="Go to homepage">Homepage</a> text after link; <a href="/" title="About">About</a> text after link; <a href="/" title="Contact Us">Contact Us</a> text after link; No problem: I can remove the link with: $("a:contains('Homepage')").remove(); My question: How to remove the text after the link previously...

How do I display an animated image during Page Load using jQuery

Hi there, I have an ASP.NET page that takes a long time to load due to the loading of multiple user controls. Is there a way where I can show a loading animation using jQuery while the page is loading? Thanks. ...

How to load values without setTimeout?

Look the following example: <select id="connection" onchange="load_databases_of_this_connection();"></select> <select id="database" onchange="load_tables_of_this_database();"></select> <select id="table" onchange="load_columns_of_this_table();"></select> <input id="fieldcode" type="text"/> <input id="fieldcolor" type="text"/> <script ty...

jQuery selectors, generalising a selector by anchor ID

I've got some code on my site that displays a list of articles on a blog as follows (there will be multiple objects with the same category): <ul class="article category1"> <li> etc <li> </ul> <ul class="article category2"> <li> etc <li> </ul> <ul class="article category3"> <li> etc <li> </ul> I've got some jQuery cod...