Answers for "how to get the class name dynamically using jquery"

0

how to get the class name dynamically using jquery

<input id="btn" class="wpsc-buy-now-button wpsc-buy-now-button-64" type="image"
    name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online" />
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

$('.' + $classOfBtn) //note the dot
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

$('.'+$classOfBtn)
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

$('.setvalue').on('click', function() {
       var id = $(this).data("id");
       var inp =  $('#applicantstatus_' + id).val();
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

$(document).ready(function () {
    var $allClasses = $("[name='submit']").attr('class').split(' ');
    for(var i=0; i < $allClasses.length; i++)
    {
        // Check $allClasses[i] here.
    }
});
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

var classArray = $('input').attr('class').split(' ');
// So now you can declare variables
var classbtn1 = classArray[0];
var classbtn2 = classArray[1];
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

var id = $(this).attr("id")
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

var className = $('#id').attr('class');
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

$(document).ready(function () {
    var $classOfBtn = $('#btn').attr('class').split(' ')[0] + '-64';
    alert($classOfBtn );
});
Posted by: Guest on October-17-2020
0

how to get the class name dynamically using jquery

var $classOfBtn = wpsc-buy-now-button-64;
Posted by: Guest on October-17-2020

Code answers related to "how to get the class name dynamically using jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language