jquery

how a cursor blinks in jQuery text editor?

Hello friends, I am just trying to know a text editor works ( jquery ), I found many jquery text editors on web. My question,the editor itself is not a textarea but an iframe I think, but How the cursonr blinks like a cursor in text area please check this http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html ...

How can I pass a list of objects to an ASP.NET MVC action using jQuery?

I have defined an object type in .NET that I want receive in a List<> as the input to an ASP.NET MVC action method? Here is the action method and class I'm trying to receive. public class WhereClause { public string ColumnInformation { get; set; } public string WhereValue { get; set; } public string AndOr {...

How do I over write the styles on a jQuery dialog

Hi there, I want to create a jQuery dialogue and overwrite the color setting for this one instance, not any others - now creating the dialog is easy but setting it's styles is providing difficult, how do I change the title and overlay colours? I'd like to add them dynamically here, something like background:"red", as I don't want to cha...

How do I check with jQuery if an element has at least one class, from a list of specified classes?

Example html: <div class="red"></div> <div class="green"></div> <div class="blue"></div> <div class="apple"></div> I want to loop through the divs and filter them out if they don't have a class of either 'red', 'green', or 'blue.' var onlyColorDivs = $('div').hasClass( ____ ); Is there a way to fillin the blank in the previous line...

How to iterate through only the text box elements in the form using jquery

I have a form which contains 4 text fields when the button is clicked we should see that atleast one of the textfield should contain the value and the form should get submitted and the form also contains the Button which of input type too .I want only textbox field values $("#mybutton").click(function(){ $(":input").each(function(...

Roll up child elements in nested jQuery Accordion

When using jQuery's Accordion (in a nested fashion), I want to ensure that when a parent element is clicked/opened, any open children are closed/rolled up. I'm not sure what selector(s) I should use when attempting to do this. So far I've tried rigging a change event with "activate" set to false, but that simply makes any element that ...

Setting var to sum of two textbox values is 0, how come?

I am experiencing something odd, please see below. Why is alert 1 outputting 0 but alert 2 outputting the correct sum? They are set to the same thing... var sumTotal = parseFloat($('#tb1').val()) + parseFloat($('#tb2').val()); //tb1.val() == 3, tb2.val() == 5; 1) alert(sumTotal); //Outputs 0; 2) alert(parseFloat($('#tb1').val()) + ...

Display selected checkbox values in div with jQuery

I have a series of checkboxes and I would like to append the text value to a div every time and item gets selected, but I'd also like to remove the item from the div's text when an item is deselected. I'm guessing the best way would be with some sort of an array? Can I get some guidance on this one? edit: I should have mentioned this i...

jquery load partial view asp.net mvc

i have some header tabs on a basic index.aspx page that uses a masterpage. the header tabs are correctly rendered on the index page from a viewusercontrol (<% Html.RenderPartial("pvHeaderTabs")%>). the problem is i am trying to load other partial views into the index page without any luck. can someone point out what i am doing wrong? ...

What is the best way to include specific jQuery functions to authenticated/logged-in users on my ColdFusion page?

I've got a ColdFusion page that I want to include some admin level jQuery functions to authenticated users but I'm not sure what the best practice is for achieving this. Currently, I have a cfif statement inside my document.ready that checks to see if the user is logged in (session scope) and if so, runs a cfinclude to a file with the ad...

Jquery toggle click

Say I need an element to animate when clicked. To do this I just: $('#header .icon').click(function() { $('#header form').animate({width:'195px'}); }); But how would I make it so that when I click the element again the opposite animate takes place? (e.g. animate to width:0px ) ...

jQuery script supposed to run async but works only sync? why?

I have this small jquery script that does not work if I remove the 'async:false' part... And I don't understand why (the alert() part is there just to check if it works or not). My guess was it would work asynchronously but it just doesn't. Can somebody explain to me why? And what should I change to make it async? $(document).ready(func...

Problem with mouseout function when showing and hiding a div

I have a navigation item which, when clicked, shows a hidden div. I'm having trouble getting the div to hide when you mouseout of the div. I would like it to hide when the user's mouse leaves the bounds of the div. Here is the jquery: $(document).ready(function () { $('li#locations a').click( function(){ $('#lo...

How to prevent jQuery uidatepicker from highlighting selected (or current) date in all months of calendar?

I've gone through the options for this plugin several times and can't seem to find a way of turning off this behaviour: the current or selected date is highlighted in all months of the widget, not only the current month. For example if I select August 17th then advance to september, october and so on, the 17th will also be selected in th...

Execute custom function on dynamic loaded page in jQuery

I have tab in a web page that loads and displays another page dynamically, using this code: $(document).ready(function(){ $(".tab-content").hide(); $("#one").show(); $("a.tab-name").click(function(){ $(".tab-name-active").removeClass("tab-name-active"); $(this).addClass("tab-name-active"); $(".tab-con...

Javascript / jQuery design question re: performance

Is there any performance / memory hit differential among the three following styles? Exhibit A: var func = function() { // do some magic } $("#div").somePlugin({someEvent: func}); Exhibit B: $("#div").somePlugin({someEvent: function() { // do some magic }); Exhibit C: function func() { // do some magic } $("#div").s...

functionality similar to twitter using codeigniter

Hi Guys, I will first tell you my scenario, in my problem there are two users of the system one who is using the system to register people to it, and another person who use the system to check the registered users in the system. this is a hospital scenario, people register at the registration desk and in the registration order doctor c...

jquery inside fancybox not working

hi... I am facing problems with jquery within fancybox. Basically I have a form rendered through ajax and its been loaded within fancybox. But the problem is, jquery doesn't work on the form loaded by fancybox :( but it works fine when i go to the actual form page. I found a similar problem here http://groups.google.com/group/fancybox/...

Javascript/Jquery Single event target delegation

Dear experts, I realized event.target redundancy could cause a lot of problems in the future when they are binded with another event in the next level. For example, when i have an Div element inside another. <div id='div1'> <div id='div2> </div> </div> I use the follow Jquery code to bind an event. $('div').bind('click', func...

Redirect unless the page is called from jQuery

I have a page that is dynamically loaded into another page by an jQuery call. What I want is to make the loaded page accessible only if is called by the jQuery and to redirect if it's accessed directly from the browser address bar. How do I do that? Thanks! ...