i have an issue with a jquery function. in IE appear SCRIPT5 and access denied errors, everything works fine on the others browsers, and i know exactly wich part is that make the error, if i take it, the page load normal, but if dont , i just get a blank page. the bold text, is the part that i mentioned, and doesnt matter if i write .html() or .append(). some suggestions ? please.
This is the script :
$('.ca-item-main a').live('click', function(e){ e.preventDefault(); var href = $(this).attr('href');
UpdateProducto(href); }); $('.nav a').live('click', function(e){ e.preventDefault(); var href = $(this).attr('href');
href = href.substr(href.indexOf('/') + 1); var categoriaName = href.substr(0, href.indexOf('/'));
i have a slider that perfectly works, but when i select a image, from the thumbcontroler, its stops, i need, that when a select a image, with the thumbnail selector, the autoplay function begins again, this is the code that i have
i try just erase the .stop() part, but it doesnt works, at the begining of the code, i set de autoplay "true" function, but its working just when the document its ready, but its not allowed when a click on a thumbnail.
How can i add a "else" function correctly, i want that have the same function but inverse, clicking in the same element. this is the code, where i wanna add a "else" function, is the par in red.
g.SearchFriend = function (e, txtBox) { ajaxRequestAbort(); var code; var filter = $(txtBox).val(); var friendsSelected = $('#FriendsSelected').sortable('toArray'); var type = "test&data"; var param = 'type=' + type + '&filter=' + filter + '&friendsSelected=' + friendsSelected; ajaxRequests = $.ajax({ url: $Url.resolve("~/Bounce/GetFriendsBounce"), data: param, cancelExisting: true, success: function (data) { if (data.peopleFound) { loadViewRowFilter(data.people); } else { Likter.Common.Error(data.Message); } }, type: "POST" }); $(txtBox).focus(); }
g.SearchCategory = function () { ajaxRequestAbort(); var code; var filter = $('#txt-search-cat').val(); var catSelected = $('#CategoryListSelected').sortable('toArray'); var param = {}; param.Filter = filter; if (catSelected.length > 0) { var arrayInt = []; for(i = 0; i < catSelected.length; i ++) { arrayInt[i] = parseInt(catSelected[i]); } param.SelectedCategories = arrayInt; } else { param.SelectedCategories = null; }
i have two list, the fisrt list its a FriendList, and the other one with Selectet Friends,
so, the first list take the ID ( clicking ) for every friend ( with a "+" sign), and move to "SelectedFriends" list ( and change the "+" sign, for a "-" sign ) , the same thing if i wanna remove a friend of "SelectedFriends" list ( with a "-" sign) and go back to the Friendlist ( with a "+" sign again).
the problem is, when a add a friend to SelectedFriend list, change ALL the "+" sign for a "-", ( even the Friends that i not add yet), and when a remove a friend change ALL the "-" signs for a "+" sign, (even the friends that still in the SelectedFriends list).
so, if the behavior its correctly, (add or remove just the clicking friend) why change the class ( "+" and "-" sign ) for all the items in both list.
this is the code taht im using.
g.Remove = function (id) { var ids = '#' + id; if ($(ids).length == 0) { ids = "#f" + id; } $(ids).appendTo('#FriendsList'); Likter.Bounce.ChangeImage(); $(".icon").removeClass("icon").addClass("iconadd"); };
i try the use the $(this) selector, and not the $("ClassName"), but doesnt work, if i do that.
i have a < li > menu and works perfectly, all the functions, but i can enable / disable a "selected" style, here is te jquery code for the function of the menu:
var index = jThis.parent().children().index(this); index = (index * 73);
_toolBar.find('ul').css('margin-top', '-' + index + 'px'); } return false; }
and here is the CSS code:
.lkr-toolbar.toolbar-read-mode ul li{background-color: #586678; background-image:none} .lkr-toolbar.toolbar-read-mode ul li:hover{background-color: #175898;} .lkr-toolbar.toolbar-read-mode ul li:active{background-color:#C60000;} .lkr-toolbar.toolbar-read-mode ul li:selected{background-color:#C60000;} .lkr-toolbar.toolbar-read-mode ul li a{background-color: transparent;}
i have this script for a character counter in a DIV with "contenteditable" property,
so its working perfectly, but just in count up, if a press delete key, the numbre in the counter doesnt change, and a need to add change that, and the counter show the real number of characters that the content that i write,
my script is the next.
function characterCounter() { var counter = 0; $("#AddNoteDescription").bind("keypress", function () { counter += 1; $("#counter").html(counter + " / 3,000"); if (counter == 3000) { $(this).unbind("keypress").removeAttr("contenteditable"); } }); };
well, i find a example with exactly what im looking for, i tried and work it ! BUT....
i make the tutorial and perfectly works, in a single html, only for that, but when i try to implement in mi proyect,
not work it all, its like the code doesnt be there.
now, i put the code in a master .js where i include all the scripts for that page, and just call the functions, now the single code its perfectly fine, but its broken when i include on the master javascript.
i have to do a character counter, in a textfield, BUT !! its not a Textflied, its a DIV with the "ContentEditable" property, the plugin that i use before is this:
How can i modify this plugin, to do the same thing, but in a DIV ?