The following code works, but I'm sure there is a more compact way to achieve the same result, particularly the string replacement:
$('#nav-main .nav-sub').each(function() {
var name = $(this).attr('id');
$(this).children('li').children('a').each(function() {
...
|
I have a jquery plugin that is working on all browsers, except opera. The removeHighlight function gets triggered, but the html is not changed. As far as I can see IE, ... |
i have the following code:
function getArticleContent() {
var toPromote = 'example';
var toReplace = '<a href="/tags/'+toPromote+'">'+toPromote+'</a>';
var content = $(".a-entry").text();
...
|
I have an inline markup editor built into my website, which should produce XHTML compliant markup. But as you can see, it uses the deprecated font tag and size attribute. ... |
i have a little problem and i have no idea what is wrong
var selector_css;
var sheet= document.styleSheets[0];
var rules= 'cssRules' ...
|
I have a simple URI that looks like the following:
/stuff/assets/1234/asset/foobar
What's the proper way with jQuery to replace the assets with another word? if I do a simple .replace('asset', 'something') it changes ... |
How do I replace two double quotes into single one using jQuery?
For example: I need to replace
Sam is at his ""Home""
to
Sam is at his "Home"
Looking for something ... |
|
I have this jQuery code which replaces some HTML character codes with their equivalent:
$('.someText').html()
.replace(/&/g, '&')
...
|
I'm trying to create a dynamic searchbar and i need help.
Right now im trying to replace a string with another string but i cant seem to succeed.
Im getting input from the ... |
I'm struggling with an issue of Javascript RegEx replacement. What I need to do is run a replacement over a paragraph of text looking for "[card]lorem ipsum[/card]"
I found jQuery plugins which ... |
I have the following output.
<img width='70' height='70' class='centreimg' src="http://localhost/aktivfitness_new/assets/images/centre/centre1.jpg" />
There are same outputs with centre2.jpg etc.
Now I want to replace this centre1.jpg to hover.jpg when I hover.
But when I use ... |
i have buildt a small highlight script, this script has a results tags, which means that you can enter words in a input field and it will be displayed as clickable ... |
How do I replace multiple \n's with just one? So if a user enters
blah
blahdy blah
blah blah
I want it to end up looking like.
blah
blahdy blah
blah blah
I know I could loop through ... |
I have a piece of code which replaces tokens in a string. I have the replacement values stored in an array.
Essentially, I would like to analyse the string and replace it ... |
I'm working on a donation webapp, and I need to format a string the will leave minuses (-), pluses (+), and decimals (.). I want people to be able to ... |
If i have {code}{type="hey"} and I want to replace it with <code><pre class="hey"> how can I do it binding some method to this function:
$('.wysiwyg textarea').live('keyup',function(){
wysiwyg_val = $(this).val();
...
|
I have some text content (read in from the HTML using jQuery) that looks like either of these examples:
<span>39.98</span><br />USD
or across multiple lines with an additional price, like:
<del>47.14</del>
...
|
I ashamed and frustrated by this question. I'm writing what should be a pretty simple script that removes "y"s and replaces them with "i"s. When this happens, I add a ... |
I've got the following 'dictionary':
var dictionary = {
"Log in again": "Just do it again",
"Test phrase": "Lorem ipsum",
"word": "other word"
}
Once ... |
I'm doing a hovercard plugin for my site but have a problem with getting user id.
profile urls can be;
hxxp://mysite.com/?p=profile&id=1
hxxp://mysite.com/?p=profile&id=1&page=2
hxxp://mysite.com/?p=profile&id=1&v=wall
etc..
How can I get profiles' id by javascript Regexp Replace?
...
|
I'm working on a greasemonkey script, but the str.replace function isn't working.
I'm trying to disable the onmousedown functions for Google searches, my thought was that by replacing that with nothing, it ... |
I have the following element:
<span data-valmsg-for="Company.People[0].Name" />
What I would like to do, is take the 'data-valmsg-for' attribute and format it to look like this:
var idToLocate = "Company.People_0__Name";
How can I accomplish this ... |