I'm trying to implement a basic jQuery infinite carousel. As much for the learning process as for anything else (as a rule I'm not a fan of re-inventing wheels, but...I have to learn somehow, might as well start with the basics).
I've managed to get the list to animate left happily enough, but I'm stuck when it comes to selecting the fi...
Hi folks,
I have a container div with the following CSS:
#container {
position:relative;
overflow:hidden;
width:200px;
height:200px;
}
Why does this:
alert('height is ' + $("#container").attr('height'));
Return that height is undefined?
Thanks,
JG
...
i have this script
<select>
<option value="1">one<img src="star.gif" height="15" width="15"></img> </option>
</select>
but it doesn't work.
how can i put an image into select?
thanks
update:
so it's impossible?:(maybe via javascript?...
...
I am having the hardest time wrapping my head around this. I recently asked this question Create/Edit/Save data in a jQuery pop-up for ASP.NET-MVC and Linq2Sql I'm sure that the response is the right way to go, but I just can't figure out how to write the back-end code to make it work. I originally made my site by following the nerddi...
There has to be a better way of writing the js in my function....
I need to end up with bare json that looks like this [1095365, 1125504].
Setup of code example;
var article = {"Id":0,"dirtyFlags":null,"textAreas":null,"metaData":null,"relatedCIs":[{"Id":1095365,"Type":4},{"Id":1125504,"Type":4}],"clients":[{"Id":992754}]};
myFunction...
Hi,
I'm trying to determine the width of a string. I'm using the following code but it always return 0. It seems to be that as the span element is created and not already present in the page body, jQuery width() returns 0. Is there a way such that I can get the width of the text without resorting to creating dummy html code in the page?...
Ok, I've got a lightbox with a small form (2 fields) in it, inside an UpdatePanel, and I want to close this lightbox (must be done via javascript) when the 'Save' button is pressed.
However, there is a need to have a server-side CustomValidator on the page, and I only want to close the lightbox if this returns as valid.
Does anyone kno...
I would like to create a custom version of the sortable widget. I have been searching for documentation, but could not find something really accurate. The best information I found was : http://jqueryui.pbworks.com/Widget-factory.
I tried :
$.widget("ui.customsortable", $.extend($.ui.sortable, {
_init: function() {
$.widget.protot...
Hi
I have this error when I try to include the tag (http://code.google.com/p/struts2-jquery/wiki/HeadTag) in a sitemesh decorator
main.jsp (decorator)
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!D...
Hi, I'm having an issue verifying if a checkbox is checked using jquery on Internet Explorer.
This is the code I'm using:
if ($('#chkjq_1').attr('checked') == true)
It works fine on Firefox or Chrome, but on Internet Explorer 7, the condition is always false because the browser sets the property this way:
<input id="chkjq_1" type="ch...
Hi guys!
I need to split somehow some html data (a text with html tags) into two parts and hide the second one with a show/hide link.
The thing is all texts are being stored in the database with html tags. Some of those texts are short, but some are really long. We don't want't to show long ones, so one of the options is to show a teas...
I am trying to do a text replace, but to do so, i need to loop through the text nodes of a div.
Each Div upon clicking, loads via ajax it's appropriate content. But then I need to do text-replacing inside any of the text nodes inside there.
My current code, after loading the ajax content, loops through all text nodes of the whole page,...
Say I have a loop of objects (style.cover.pic) in a DIV .style_image
<% @styles.each do |style| %>
<div class="style_image"> <%=link_to (image_tag style.cover.pic.url(:small)), style %></div>
With the use of JQuery On a click event I want to load (this.href) in to the div .style_image which was click not all of the .style_image DIV'...
I write the following code all the time to handle when the enter key pressed:
$("#selectorid").keypress(function (e) {
if (e.keyCode == 13) {
var targetType = e.originalTarget ? e.originalTarget.type.toLowerCase() : e.srcElement.tagName.toLowerCase();
if (targetType != "textarea") {
e....
.ajax({
type: 'POST',
url: '..serverices/ajaxserver.asmx',
data: 'lname='+ $('#lastname').val()
}); return false;
if #lastname has a single quote, it throws an error. How to handle it?
...
Is it possible to add icons to the buttons on a jQuery UI Dialog? I've tried doing it this way:
$("#DeleteDialog").dialog({
resizable: false,
height:150,
modal: true,
buttons: {
'Delete': function() {
/* Do stuff */
$(this).dialog('close');
},
Cancel: function() {
...
I'm using Eric Martin's SimpleModal plugin (thanks, Eric for sharing such a great solution!) on a project and have run into a few problems integrating OnOpen and OnClose effects into my existing code.
The page I'm working on has 6 different modals with prev/next functionality and I can't figure out how to integrate the following onOpen ...
My function below calls a partial view after a user enters a filter-by string into the text box '#DocId'. When the user is done typing, the partial view is displayed with filtered data. Since my textbox needs to be in the partial view, when user is done entering a filter-by string and is shown the filtered data, the textbox is reset an...
I'm trying to apply validation to a form using following code :
$("#paiement").validate({
errorClass: "invalid",
validClass: "success",
rules: {
referenceTypeComplementBancaire: "required",
banque: {
required: function(nomBanque){
return $('input...
How can i hide the scrollbar of using css/jQuery? i notice that the slideDown() function makes the scrollbar to be hidden but i can't understand why(the precise reason/behaviour).
...