I have an array like this
var words = [
{
word: 'Something',
link: 'http://www.something.com'
},
{
word: 'Something Else',
link: 'http://www.something.com/else'
}
];
I want it to search the page for word and replace it with link. Is there an efficent way of doing this? It seems it may be CPU hungry...
Beer
<br>
Vodka
<br>
rum
<br>
whiskey
how can you select beer ? or rum ? in jquery ? they are not surrounded by any html tags....
...
I have the following table structure;
<tr>
<th><label for="ctl00_bodyContent_username">username:</label></th>
<td class="field"><input name="ctl00$bodyContent$username" type="text" id="ctl00_bodyContent_username" /></td>
<td class="info">
<div class="message...
I'm using a transparent PNG with the Google IE fix library. This fix only works on images urls that end in "-trans.png".
Rails' timestamp-based caching is causing problems with this. When I use image_path() to generate the URL for the image, it appends the file's last-modified timestamp to the image's query string. Since the URL no long...
how to disable style for element already has styled with css by element name and I can't make the same same style by etering a class name in css just #ElementName which style attribute doesn't shown on html code?
...
Hi,
I'm looking to create a widget system, somewhat like what WordPress has.
Please suggest what script would be the best for this. I've planned to use jQuery UI for this, but would like to listen to other suggestions as well.
...
I'm trying to truncate a string to a certain pixel width. The best way I discovered is through using jQuery's selector and possibly using each on the results. My attempt is at http://jsbin.com/umawi/edit. I haven't done much jQuery at all, and any help is appreciated.
Thanks
Edit: I need to do this for inline elements and not block ele...
i am using the code found here http://stackoverflow.com/questions/1443465/jquery-dynamic-div-height
<script type='text/javascript'>
$(function(){
$('#center').css({'height':(($(window).height())-162)+'px'});
$(window).resize(function(){
$('#center').css({'height':(($(window).height())-162)+'px'});
});
});
</script>
no...
I am writing a jQuery function that relies on knowing the current #anchor of the page. I am using the jQuery URL Parser plugin to get the anchor.
$.fn.vtabs = function() {
alert("Your anchor is "+$.url.attr('anchor'));
}
This code gives me the anchor "#nav" endlessly (I use #nav in some of the my links). I can type in "#newanchor...
Hi,
Following is my code, i want to hide a li tag depending on its content.
dom.find('ul#overlay_opt li').click(function(){
if($(this).attr('class') != 'deactive'){
var content = $(this).text();
if(content == 'none') dom.find('#secondary_para').hide();
else dom.find('#secondary_para').html($(this).text()).show();
}
});
...
I have a list of data that i have in a view from an asp.net mvc application. It's a list of stock and I have two images (a plus and a minus) on the end of each row which will allow me to increase or decrease stock quantity. It works fine at present with a call to the mvc action but since the list is long I want to use jQuery and AJAX to ...
I'm looking for a high-quality plugin or library for creating custom cross-browser-compatible skins for HTML form controls. I want to eliminate the inconsistency of visual appearance of form controls in different browsers and operating systems.
I've done some searching, and the most useful page that I stumbled upon is:
http://www.quene...
According to http://jqueryui.com/demos/tabs, tabs that load content via AJAX will show "Loading..." while the content loads. If you want to customize this message, you can (supposedly) set the spinner option:
$("#tabs").tabs({ spinner: "Just a sec..."});
However, I'm having these problems:
Setting the spinner option doesn't seem to ...
I am writing an application in JavaScript (w/ JQuery). The application has a lot of functionality that the user needs to access quickly and possibly at the same time (you could think of it as a game, even though it's not a game) so I've set it up to use the keyboard. I've got a prototype of the system working (in Chrome, at least), but...
i hae a link like ( domain.com/jsapi?key=123456 )
hov can i get this "key" into my JS code? i use jQuery and i don't know about its are easy way to get this "key" into JS variable.
tanks for all.
...
I need to add dynamic controls and get its values in my asp.net mvc (C#) application using jquery.
On click of button, i need to add specific dynamic controls, enter the values and pass its values on clicking submit button using jquery.
For ex.: In Create Event of Google Calendar, we can add multiple options for reminder. Like that i n...
This code lets me display/hide a custom message msg_one msg_two msg_three when the appropriate div is hovered/unhovered over. The appropriate message is injected into the #screen div and show/hide is then applied. The code is almost identical except for the first 2 lines #one vs #two vs #three and the message being displayed msg_one msg_...
I am using the jquery date picker found here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html that allows the user to pick a start and end date.
However I want to be able to disable specific dates.
I tried to implement the code found here: stackoverflow.com/questions/501943/can-the-jquery-ui-datepicke...
Hi folks,
Notice how StackOverflow displays some nice Status Bar message based on your activity? (That orange bar at the top page) I'm hoping to do the same but I'm not sure how.
Now I know how to display validation errors to the UI using ASP.NET MVC 1.0 ... that's not too hard. But if i want to show a status bar thingy (not sure what...
i'm using jquery. i have a anchor list. i'm enumerate anchors, if it visited, set display:none;
i need when click on the anchor, anchor will changed to visited state from javascript?
How can i do?
...