Custom Camel Case by jquery

Problem:some times name field in camel case and also first letter in each word is big like 200% or any custom size.

then the below program can help to do that.

solve:

$(document).ready(function(){

var words = $(‘#user-name’).text().split(‘ ‘);

var html = ”;

$.each(words, function() {

html+='[span_style=”font-size:custom-px;”]’+this.substring(0,1)+'[/span]’+'[span_style=”font-size:custom-px;”]’+this.substring(1)+'[/span]’+ ‘ ‘;

});

html=html+'[span_style=”font-size:custom-px;”]’+”‘s”+'[/span]’;

$(‘#user-name’).html(html);

});

The actual code is given in following picture :

Custom Camel Case

Change url by JavaScript

// set new url

var str = jQuery( ‘#csv-dl-link’ ).attr( ‘href’ ); // getting the url
var res = str.split( “/” ); // spliting / exploding the url
var new_url = ”;

for ( var i = 0; i < res.length - 1; i++ ) { // concatenating new url new_url = new_url + res[ i ] + '/'; } new_url = new_url + 'anything you want to add here for you url'; jQuery( '#csv-dl-link' ).attr( 'href', new_url ); // replacing the url happy coding!